> On the following testcase we have IF_THEN_ELSE in insn notes, > and when folding it, folded_arg1 is a subreg from earlier CC setter, > as the other argument has equiv constant, simplify_relational_operation > is called on it to simplify it and we end up with invalid RTL sharing > of the subreg in between the CC setter insn and the insn with the REG_EQ* > note. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2012-10-22 Jakub Jelinek <ja...@redhat.com> > > PR rtl-optimization/55010 > * cse.c (fold_rtx): Call copy_rtx on folded_arg{0,1} before passing > it to simplify_relational_operation.
OK with: * cse.c (fold_rtx) <RTX_COMPARE>: Call copy_rtx on ... and if you also fix the long simplify_relational_operation line. -- Eric Botcazou