mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Emit NOT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
492c2935be
commit
d4dab929d8
@ -1382,9 +1382,22 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
||||
case ISD::XOR:
|
||||
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.getOperand(1))) {
|
||||
Tmp1 = SelectExpr(N.getOperand(0));
|
||||
|
||||
if (CN->isAllOnesValue()) {
|
||||
switch (N.getValueType()) {
|
||||
default: assert(0 && "Cannot add this type!");
|
||||
case MVT::i1:
|
||||
case MVT::i8: Opc = X86::NOT8r; break;
|
||||
case MVT::i16: Opc = X86::NOT16r; break;
|
||||
case MVT::i32: Opc = X86::NOT32r; break;
|
||||
}
|
||||
BuildMI(BB, Opc, 1, Result).addReg(Tmp1);
|
||||
return Result;
|
||||
}
|
||||
|
||||
switch (N.getValueType()) {
|
||||
default: assert(0 && "Cannot xor this type!");
|
||||
case MVT::i1:
|
||||
case MVT::i8: Opc = X86::XOR8ri; break;
|
||||
case MVT::i16: Opc = X86::XOR16ri; break;
|
||||
case MVT::i32: Opc = X86::XOR32ri; break;
|
||||
|
Loading…
Reference in New Issue
Block a user