On 07/14/11 18:19, Bernd Schmidt wrote: > On 07/14/11 18:03, Richard Henderson wrote: >> On 07/14/2011 03:03 AM, Bernd Schmidt wrote: >>> +++ gcc/config/ia64/ia64.c (working copy) >>> @@ -1047,7 +1047,7 @@ >>> tmp = gen_rtx_PLUS (Pmode, tmp, pic_offset_table_rtx); >>> emit_insn (gen_rtx_SET (VOIDmode, dest, tmp)); >>> >>> - tmp = gen_rtx_LO_SUM (Pmode, dest, src); >>> + tmp = gen_rtx_LO_SUM (Pmode, gen_rtx_MEM (Pmode, dest), src); >> >> And the bug stems from ... what? >> >> Is this bug still fixed if you change this to gen_const_mem? > > It should be. Testing this isn't straightforward bit tricky since the > original bug is in gcc-3.3 which doesn't have gen_const_mem, and current > mainline with just the scheduler patch removed doesn't reproduce it with > the testcase.
Ok, with gen_const_mem hacked into gcc-3.3 (minus setting MEM_READONLY_P which doesn't exist in that tree) the load stays behind the branch where it should be. Bernd