https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64081

--- Comment #57 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 40697
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40697&action=edit
untested patch possibly solving AIX bootstrap

Taking in Jeff and Segher's suggestions, I propose something like the following
untested patch.  With it we unroll in the original testcase in this PR, while
avoiding the doloop unrolling in the AIX fiasco.

The loop exit check needed by this PR (get_loop_location) is set permissively,
while all the other ones in loop-unroll.c and loop-doloop.c are set
conservatively.  Presumably we can expand the permissiveness at a later date.

This is untested apart from checking that the original PR testcase still
unrolls, while AIX does not generate the CTR instructions.

If this is an acceptable approach, I can adjust all the relevant function
comments, plus update the doc/loop.texi documentation.  And yes, this patch is
on top of the original one, which presumably was already approved at some point
(but reverted).

Testing would involve AIX with the ancient toolchain patched/kludged up, plus
Linux + AIX with trunk.

Reply via email to