diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2015-02-24 18:11:38 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2015-02-24 18:11:38 +0000 |
commit | 51753c1498422e8320a418a595a6c9dec7431da5 (patch) | |
tree | fe6954ae164b29f983ccda7005ba5868d468a9ff | |
parent | ff544f6bcc823519912fe2befaa0e4ab46325d01 (diff) | |
download | gcc-51753c1498422e8320a418a595a6c9dec7431da5.zip gcc-51753c1498422e8320a418a595a6c9dec7431da5.tar.gz gcc-51753c1498422e8320a418a595a6c9dec7431da5.tar.bz2 |
re PR rtl-optimization/65123 (lra remat places insn which breaks data flow)
2015-02-24 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/65123
* lra-remat.c (operand_to_remat): Check hard regs in insn
definition too.
From-SVN: r220946
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lra-remat.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8bd6151..6941bce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-24 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/65123 + * lra-remat.c (operand_to_remat): Check hard regs in insn + definition too. + 2015-02-24 Nick Clifton <nickc@redhat.com> * config/v850/v850.h (ASM_SPEC): Pass -msoft-float/-mhard-float on diff --git a/gcc/lra-remat.c b/gcc/lra-remat.c index de5081a..fb0eb3c 100644 --- a/gcc/lra-remat.c +++ b/gcc/lra-remat.c @@ -459,6 +459,16 @@ operand_to_remat (rtx_insn *insn) reg2 = reg2->next) if (reg2->type == OP_OUT && reg->regno == reg2->regno) return -1; + if (reg->regno < FIRST_PSEUDO_REGISTER) + for (struct lra_insn_reg *reg2 = static_id->hard_regs; + reg2 != NULL; + reg2 = reg2->next) + if (reg2->type == OP_OUT + && reg->regno <= reg2->regno + && (reg2->regno + < (reg->regno + + hard_regno_nregs[reg->regno][reg->biggest_mode]))) + return -1; } /* Find the rematerialization operand. */ int nop = static_id->n_operands; |