mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Use a logical not when inverting SetCC. This unfortunately doesn't fire on any targets so I couldn't find a test case to trigger it.
The problem occurs when a non-i1 setcc is inverted. For example 'i8 = setcc' will get 'xor 0xff' to invert this. This is clearly wrong when the boolean contents are ZeroOrOne. This patch introduces getLogicalNOT and updates SetCC legalisation to use it. Reviewed by Hal Finkel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -565,6 +565,9 @@ public:
|
||||
/// getNOT - Create a bitwise NOT operation as (XOR Val, -1).
|
||||
SDValue getNOT(SDLoc DL, SDValue Val, EVT VT);
|
||||
|
||||
/// \brief Create a logical NOT operation as (XOR Val, BooleanOne).
|
||||
SDValue getLogicalNOT(SDLoc DL, SDValue Val, EVT VT);
|
||||
|
||||
/// getCALLSEQ_START - Return a new CALLSEQ_START node, which always must have
|
||||
/// a glue result (to ensure it's not CSE'd). CALLSEQ_START does not have a
|
||||
/// useful SDLoc.
|
||||
|
Reference in New Issue
Block a user