Re: Bug#800318: gcc-5: [mips,mipsel] regression: miscompilation caused by -fexpensive-optimizations
On 27.09.2015 23:10, Aurelien Jarno wrote:
> On 2015-09-27 20:37, Andreas Cadhalpun wrote:
> Thanks for the detailed testcase. I have been able to reproduce the
> issue on mipsel, but not on mips.
Indeed, this test case only works on mipsel.
However, the same tests of ffmpeg's testsuite fail on mips, just with different
checksums. So it likely has the same cause.
>> This works correctly with gcc-5 5.2.1-16, so it is a regression in 5.2.1-17.
>> The changelog reveals:
>> [ Aurelien Jarno ]
>> * Use --with-mips-plt on mips*.
>> * Build for R2 ISA on mips, mips64 and mips64el.
>> * Optimize for R2 ISA on mipsel.
>> * Only apply mips-fix-loongson2f-nop on mipsel.
>> I assume one of these changes is responsible for this regression.
> Indeed. At least on mipsel the issue is due to the use of
> -mtune=mips32r2 by default. I guess the best is to change it back to
> -mtune=mips32 until we better understand the issue.
> Does someone have time to look at the issue more in details? The
> generated code is quite different between -mtune=mips32 and
> -mtune=mips32r2 (not in terms of instructions, but in terms of
> As for mips, given I am not able to reproduce the issue, my guess is
> that it's due to the switch to -march=mips32r2, but I currently have
> no way to make sure.
A slightly larger test case for mips is compiling ffmpeg...