This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/69291] [6 Regression] wrong code at -O1 for ruby-2.3.0/regcomp.c:985:compile_length_quantifier_node()
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Feb 2016 12:38:22 +0000
- Subject: [Bug rtl-optimization/69291] [6 Regression] wrong code at -O1 for ruby-2.3.0/regcomp.c:985:compile_length_quantifier_node()
- Auto-submitted: auto-generated
- References: <bug-69291-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69291
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, of course
/* If we have x := test ? x + 3 : x + 4 then move the original
x out of the way while we store flags. */
if (common && reg_mentioned_p (if_info->x, common))
{
common = gen_reg_rtx (mode);
noce_emit_move_insn (common, if_info->x);
}
can't work - we'll overwrite 'common' here.
/* If we have x := test ? x + 3 : x + 4 then move the original
x out of the way while we store flags. */
if (common && reg_mentioned_p (if_info->x, common))
{
rtx tem = gen_reg_rtx (mode);
noce_emit_move_insn (tem, common);
common = tem;
}
does. Of course that insn might not be recognizable. The above fixes the ruby
failure for me.