Correct fix for scheduler bug PR11320

Bernd Schmidt bernds@codesourcery.com
Thu Jul 14 16:43:00 GMT 2011


On 07/14/11 18:29, Richard Henderson wrote:
> On 07/14/2011 09:23 AM, Bernd Schmidt wrote:
>> 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.
>>
> 
> RTX_UNCHANGING_P was the bit back then, I believe.

Still ok with that also set:
        addl r14 = @ltoff(ap_standalone#), r1
        ;;
        .mii
        ld8 r15 = [r14]
        addl r14 = @ltoff(.LC2), r1
        ;;
        (p7) addl r14 = 1, r0
        ;;
        .mib
        (p7) st4 [r15] = r14
        nop.i 0
        (p7) br.cond.dptk .L5
        .mib
        ld8 r14 = [r14]

And not ok if the MEM isn't exposed in RTL:
        addl r14 = @ltoff(ap_standalone#), r1
        ;;
        .mii
        ld8 r15 = [r14]
        addl r14 = @ltoff(.LC2), r1
        ;;
        (p7) addl r14 = 1, r0
        ;;
        .mii
        (p7) st4 [r15] = r14
        nop.i 0
        nop.i 0
        .mbb
        ld8 r14 = [r14]
        (p7) br.cond.dptk .L5

I'm attaching the 3.3 patch.


Bernd

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 3.3-ia64.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110714/3f447294/attachment.ksh>


More information about the Gcc-patches mailing list