[Patch, testsuite, mips] Fix two failing MIPS tests.
Richard Sandiford
rdsandiford@googlemail.com
Mon May 5 20:44:00 GMT 2014
Steve Ellcey <sellcey@mips.com> writes:
> On Sat, 2014-05-03 at 07:52 +0100, Richard Sandiford wrote:
>
>> > Old:
>> >
>> > li $5,305397760 # 0x12340000
>> > addiu $4,$5,1
>> > addiu $5,$5,-1
>> >
>> > New:
>> >
>> > li $5,305332224 # 0x12330000
>> > ori $5,$5,0xffff
>> > addiu $4,$5,2
>>
>> This isn't as good though -- $4 now depends on two previous
>> instructions. Do you know which specific change was responsible?
>>
>> Thanks,
>> Richard
>
> A quick follow up. The code in question is:
>
> void f () { g (0x12340001, 0x1233ffff); }
>
> And if I swap the arguments I get something more like the old code.
> But if I run an older GCC on that new swapped code then I get something
> like the new code. So while the old code may have been better for this
> example, the new code is better if I swap the arguments around.
OK, in that case it sounds like the optimisation wasn't working as well
as it was supposed to. But I think we should fix that rather than change
the expected output. AFAICT the new output means the const-anchor
optimisation isn't kicking in.
Thanks,
Richard
More information about the Gcc-patches
mailing list