This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/77605] [5/6/7 Regression] wrong code at -O3 on x86_64-linux-gnu
- 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: Fri, 16 Sep 2016 10:43:16 +0000
- Subject: [Bug tree-optimization/77605] [5/6/7 Regression] wrong code at -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-77605-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77605
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.2.4
Target Milestone|--- |5.5
Summary|wrong code at -O3 on |[5/6/7 Regression] wrong
|x86_64-linux-gnu |code at -O3 on
| |x86_64-linux-gnu
Known to fail| |4.3.6, 4.5.4
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Non-surprisingly found a working version. This is outer loop vectorization at
play and it looks like a dependence analysis issue to me:
<bb 3>:
# a.1_26 = PHI <0(2), _14(7)>
# ivtmp_32 = PHI <8(2), ivtmp_7(7)>
<bb 4>:
# b.0_27 = PHI <0(3), _12(5)>
# ivtmp_34 = PHI <2(3), ivtmp_33(5)>
_8 = b.0_27 + 6;
_9 = c[b.0_27][_8];
_10 = _9 ^ 1;
c[b.0_27][a.1_26] = _10;
_12 = b.0_27 + 1;
ivtmp_33 = ivtmp_34 - 1;
if (ivtmp_33 != 0)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
goto <bb 4>;
<bb 6>:
_14 = a.1_26 + 1;
ivtmp_7 = ivtmp_32 - 1;
if (ivtmp_7 != 0)
goto <bb 7>;
else
goto <bb 8>;
<bb 7>:
goto <bb 3>;
(compute_affine_dependence
stmt_a: _9 = c[b.0_27][_8];
stmt_b: c[b.0_27][a.1_26] = _10;
(analyze_overlapping_iterations
(chrec_a = {6, +, 1}_2)
(chrec_b = {0, +, 1}_1)
(analyze_miv_subscript
(analyze_subscript_affine_affine
(overlaps_a = no dependence)
(overlaps_b = no dependence))
)
(overlap_iterations_a = no dependence)
(overlap_iterations_b = no dependence))
) -> no dependence