[Bug target/63783] [4.9/5 Regression] [SH] Miscompilation of boolean negation on SH4 using -O2
gcc-bugzilla at mkarcher dot dialup.fu-berlin.de
gcc-bugzilla@gcc.gnu.org
Wed Nov 12 23:25:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63783
Michael Karcher <gcc-bugzilla at mkarcher dot dialup.fu-berlin.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc-bugzilla at mkarcher dot dialu
| |p.fu-berlin.de
--- Comment #3 from Michael Karcher <gcc-bugzilla at mkarcher dot dialup.fu-berlin.de> ---
Created attachment 33954
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33954&action=edit
Remove assumption that "not" is logical negate
Indeed the treg combine pass is broken. Thanks to the nicely documented code,
it could easily be determined, that this optimization pass contains the wrong
assumption that "not" is an assembler instruction that can be used for logical
negation of a register. As this is a bitwise negate instruction, it can not be
used that way.
As I was unable to find a machine instruction that performs logical negation, I
prepared a patch that completely removes the parts that rely on a logical
negate instruction, while keeping all other aspects on the optimization pass
intact.
More information about the Gcc-bugs
mailing list