[Bug tree-optimization/67781] Wrong code generated on mips32 with -O1 -fexpensive-optimizations
mikpelinux at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Dec 12 17:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67781
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thomas.preudhomme at arm dot com
--- Comment #4 from Mikael Pettersson <mikpelinux at gmail dot com> ---
A bisection using a cross to sparc64-linux identified r210843 as the starting
point of this wrong-code regression. The code generation difference at that
revision for this test case is:
--- shift.s-r210842 2015-12-12 18:39:22.878875236 +0100
+++ shift.s-r210843 2015-12-12 18:36:37.938974547 +0100
@@ -15,12 +15,8 @@
sethi %hi(.LC0), %o0
lduw [%g1+%lo(s)], %o1
or %o0, %lo(.LC0), %o0
- mov 0, %i0
- ldub [%g1+%lo(s)+4], %g1
- sll %o1, 8, %o1
- or %g1, %o1, %o1
call printf, 0
- srl %o1, 0, %o1
+ mov 0, %i0
return %i7+8
nop
.size main, .-main
that is, the "<< 8" and "| s.b" parts of the expression were lost.
Adding author to CC.
More information about the Gcc-bugs
mailing list