------- Comment #15 from dave at hiauly1 dot hia dot nrc dot ca 2006-11-26 00:04 ------- Subject: Re: [4.3 Regression] build/genconditions ../../gcc/gcc/config/pa/pa.md > tmp-condmd.c: /bin/sh: 13354 Memory faul
> (insn 98 97 99 7 foo.c:27 (set (reg/f:DI 25 %r25 [ cond ]) > - (mem/f/c/i:DI (reg/f:DI 72) [8 cond+0 S8 A64])) 124 {*pa.md:4480} > (nil) > + (mem/f/c/i:DI (plus:DI (reg/f:DI 29 %r29) > + (const_int -64 [0xffffffffffffffc0])) [8 cond+0 S8 A64])) 124 > {*pa.md:4480} (nil) > (nil)) > Someone care to explain why this is a wrong transformation by fwprop? This is the transformation that's wrong and the one that causes garbage to get loaded in r25 for the call printf. r29 is called used/clobbered and not preserved across the previous call. It's defined so in the macro CALL_USED_REGISTERS in pa64-regs.h. It's the argument pointer and must set up prior to every call. On most targets, it's a fixed register but not on PA64. Even if it wasn't call clobbered, fwprop seems to have missed the fact that the value in r29 changes at insn 92 and every other call in the preceding insn flow: (insn 92 91 93 7 foo.c:26 (set (reg/f:DI 29 %r29) (plus:DI (reg/f:DI 30 %r30) (const_int -48 [0xffffffffffffffd0]))) 164 {*pa.md:5309} (nil) (nil)) At least in the past, it never was never necessary to have a complete list of call used registers appended to each each call. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29840