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

--- Comment #5 from seurer at gcc dot gnu.org ---
Created attachment 42385
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42385&action=edit
test case that shows the problem

This is a cut down single function test case that shows the problem.  I tried
cutting out more but it changed how the code was generated too much to show the
issue.

Compile it with a powerpc compiler built with -mcpu=power6 or power6x

~/gcc/install/gcc-test2/bin/gcc -O3 -S -o bad.s bad.c

And look for the srawi that shifts by 13.  I changed it from 11 to make it
easier to find because there are other shifts by 11.  Then trace the result on
its way to the function call.

I see:

303:    srawi 10,31,13

305:    stw 10,29148(1)

325:    ld 16,29144(1)

332:    mr 27,16

545:    mr 6,27
546:    bl gl_write_texture_span

Reply via email to