diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2018-09-25 06:56:36 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2018-09-27 09:25:14 +0000 |
commit | 0378e2ec3fc15a72e543b336d1ea4d3677c569ef (patch) | |
tree | 6b5de2537a0c7c5c96c62e024d1ce56ff5a5f768 | |
parent | d01d2f1d03209f546a2ca0d1f21b0dd69b89d04d (diff) |
gcc/
Backport from trunk r264548.
2018-09-24 Andrew Pinski <apinski@marvell.com>
* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
access prev before checking it for NULLness in the
AARCH64_FUSE_CMP_BRANCH case.
Change-Id: I07be35806232d6b1edc764110f5936875f4edc40
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index d3605bea320..d37b840b023 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -14398,8 +14398,6 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) if (aarch64_fusion_enabled_p (AARCH64_FUSE_CMP_BRANCH) && any_condjump_p (curr)) { - enum attr_type prev_type = get_attr_type (prev); - unsigned int condreg1, condreg2; rtx cc_reg_1; aarch64_fixed_condition_code_regs (&condreg1, &condreg2); @@ -14409,6 +14407,8 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) && prev && modified_in_p (cc_reg_1, prev)) { + enum attr_type prev_type = get_attr_type (prev); + /* FIXME: this misses some which is considered simple arthematic instructions for ThunderX. Simple shifts are missed here. */ if (prev_type == TYPE_ALUS_SREG |