http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47614
Pat Haugen <pthaugen at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bergner at gcc dot gnu.org, | |meissner at gcc dot | |gnu.org, wschmidt at gcc | |dot gnu.org --- Comment #1 from Pat Haugen <pthaugen at gcc dot gnu.org> 2011-02-04 22:47:57 UTC --- Premature bug creation before... 301.apsi started failing on PowerPC with r169782. Attatched testcase was compiled with 'gfortran -S -m64 -mcpu=power7 -O3 -funroll-loops -ffast-math'. Following is good/bad snippet of the assembler. r169781: xsmaxdp 0,0,11 ble 7,.L2 mr 10,5 addi 0,7,-2 lfdu 5,8(10) rlwinm 8,0,0,29,31 li 9,1 xscmpudp 0,0,5 ble 0,.L2 r169782: xsmaxdp 0,0,11 ble 7,.L2 xscmpudp 0,0,11 addi 0,7,-2 mr 10,5 rlwinm 8,0,0,29,31 li 9,1 ble 0,.L2 Note in the new version that the lfdu instruction is gone. This doesn't affect the compare since the memory value in f11 is still valid, the problem is that elminating the lfdu instruction elminates the increment of r10 which causes problems later on when it is used in subsequent loads (and is pointing at the wrong location).