summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMInstrInfo.td
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-08-24 00:35:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-08-24 00:35:46 +0000
commitaaf217953bef3b2cc0e0f26bf474616cc20cf7f0 (patch)
tree03d4c0a9764168a4bc33cee724cb7946e531567a /lib/Target/ARM/ARMInstrInfo.td
parent9e085a86376179cd471c3e6a59987339110ff92e (diff)
downloadllvm-aaf217953bef3b2cc0e0f26bf474616cc20cf7f0.tar.gz
llvm-aaf217953bef3b2cc0e0f26bf474616cc20cf7f0.tar.bz2
llvm-aaf217953bef3b2cc0e0f26bf474616cc20cf7f0.tar.xz
Fix undefined behavior (negation of INT_MIN) in ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrInfo.td')
-rw-r--r--lib/Target/ARM/ARMInstrInfo.td2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td
index 992aba5803..6d60a76a43 100644
--- a/lib/Target/ARM/ARMInstrInfo.td
+++ b/lib/Target/ARM/ARMInstrInfo.td
@@ -275,7 +275,7 @@ def imm16_31 : ImmLeaf<i32, [{
def so_imm_neg_asmoperand : AsmOperandClass { let Name = "ARMSOImmNeg"; }
def so_imm_neg : Operand<i32>, PatLeaf<(imm), [{
- int64_t Value = -(int)N->getZExtValue();
+ unsigned Value = -(unsigned)N->getZExtValue();
return Value && ARM_AM::getSOImmVal(Value) != -1;
}], imm_neg_XFORM> {
let ParserMatchClass = so_imm_neg_asmoperand;