diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-03-15 22:54:20 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-03-15 22:54:20 +0000 |
commit | 0ac754f6f43a0e5a56f712aebb663581ae512e4c (patch) | |
tree | 00c8bf0a5bd9c35ac268a61659e2c57c0ab232e6 /test | |
parent | 90d9e022850240e3b5a8f943ea8e7b85987673b3 (diff) | |
download | external_llvm-0ac754f6f43a0e5a56f712aebb663581ae512e4c.zip external_llvm-0ac754f6f43a0e5a56f712aebb663581ae512e4c.tar.gz external_llvm-0ac754f6f43a0e5a56f712aebb663581ae512e4c.tar.bz2 |
[fast-isel] Address Eli's comments for r152847. Specifically, add a test case
and still allow immediate encoding, just not with cmn.
rdar://11038907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM/fast-isel-cmp-imm.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fast-isel-cmp-imm.ll b/test/CodeGen/ARM/fast-isel-cmp-imm.ll index 1693066..660156a 100644 --- a/test/CodeGen/ARM/fast-isel-cmp-imm.ll +++ b/test/CodeGen/ARM/fast-isel-cmp-imm.ll @@ -229,3 +229,22 @@ if.then: ; preds = %entry if.end: ; preds = %if.then, %entry ret void } + +; rdar://11038907 +; When comparing LONG_MIN/INT_MIN use a cmp instruction. +define void @t13() nounwind ssp { +entry: +; ARM: t13 +; THUMB: t13 + %cmp = icmp slt i32 -123, -2147483648 +; ARM: cmp r{{[0-9]}}, #-2147483648 +; THUMB: cmp.w r{{[0-9]}}, #-2147483648 + br i1 %cmp, label %if.then, label %if.end + +if.then: ; preds = %entry + ret void + +if.end: ; preds = %entry + ret void +} + |