This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/68624] [6 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu (in 64-bit mode)
- From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Dec 2015 11:48:14 +0000
- Subject: [Bug rtl-optimization/68624] [6 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu (in 64-bit mode)
- Auto-submitted: auto-generated
- References: <bug-68624-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68624
--- Comment #5 from ktkachov at gcc dot gnu.org ---
Thanks, I've come to the same conclusion.
The code in noce_cmove_arith that checks for overlapping writes
among the basic blocks has a bug. In the code:
if (emit_a || modified_in_a)
{
modified_in_b = emit_b != NULL_RTX && modified_in_p (orig_a, emit_b);
if (tmp_b && else_bb)
...
changing the second if to:
if (tmp_a && else_bb)
fixes the testcase. But the whole logic there is becoming somewhat convoluted.
I'll see if I can make the control flow there clearer