https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81550
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The patch changed what ivopts does on the loop, previous:
# ivtmp.13_22 = PHI <ivtmp.13_26(5), 0(3)>
_4 = MEM[base: b_13(D), index: ivtmp.13_22, offset: 0B];
_6 = MEM[base: c_14(D), index: ivtmp.13_22, offset: 0B];
_8 = _4 + _6;
MEM[base: a_15(D), index: ivtmp.13_22, offset: 0B] = _8;
ivtmp.13_26 = ivtmp.13_22 + 8;
if (ivtmp.13_26 != _18)
is now:
# ivtmp.4_22 = PHI <ivtmp.4_25(5), ivtmp.4_26(6)>
# ivtmp.6_23 = PHI <ivtmp.6_18(5), ivtmp.6_19(6)>
# ivtmp.8_9 = PHI <ivtmp.8_27(5), ivtmp.8_32(6)>
ivtmp.4_26 = ivtmp.4_22 + 8;
_31 = (void *) ivtmp.4_26;
_4 = MEM[base: _31, offset: 0B];
ivtmp.6_19 = ivtmp.6_23 + 8;
_30 = (void *) ivtmp.6_19;
_6 = MEM[base: _30, offset: 0B];
_8 = _4 + _6;
ivtmp.8_32 = ivtmp.8_9 + 8;
_29 = (void *) ivtmp.8_32;
MEM[base: _29, offset: 0B] = _8;
if (ivtmp.4_26 != _39)
so the loop is now longer and in addition to that the bbro pass decides to
duplicate it with conditional return in the middle. If I add a call to some
function at the end of the function, it doesn't do this anymore, but still the
loop has 9 instructions instead of 6 before and thus is over the
rs6000_loop_align 5..8 insns limit.
Mike, so what exactly changed and why don't look the lfdx and stfdx
instructions look desirable for ivopts?