diff options
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp index 95481e042b9..1e6db8960a2 100644 --- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -127,11 +127,8 @@ int ARMTTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, } // xor a, -1 can always be folded to MVN - if (Opcode == Instruction::Xor) { - int64_t NegImm = Imm.getSExtValue(); - if (NegImm == -1) - return 0; - } + if (Opcode == Instruction::Xor && Imm.isAllOnesValue()) + return 0; return getIntImmCost(Imm, Ty); } |