diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-11-10 01:30:39 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-11-10 01:30:39 +0000 |
commit | 6cba97c5557ac51d8ae09b9f5cbad6891124db4d (patch) | |
tree | c5807d2a9b1da82cfd2004ec037bbe167fd7e181 /test/CodeGen/ARM/fast-isel-cmp-imm.ll | |
parent | 83337302595a6b85523be8522c2b6105c8e159d1 (diff) | |
download | llvm-6cba97c5557ac51d8ae09b9f5cbad6891124db4d.tar.gz llvm-6cba97c5557ac51d8ae09b9f5cbad6891124db4d.tar.bz2 llvm-6cba97c5557ac51d8ae09b9f5cbad6891124db4d.tar.xz |
For immediate encodings of icmp, zero or sign extend first. Then
determine if the value is negative and flip the sign accordingly.
rdar://10422026
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/fast-isel-cmp-imm.ll')
-rw-r--r-- | test/CodeGen/ARM/fast-isel-cmp-imm.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fast-isel-cmp-imm.ll b/test/CodeGen/ARM/fast-isel-cmp-imm.ll index 220dadd88b..b1bf63f816 100644 --- a/test/CodeGen/ARM/fast-isel-cmp-imm.ll +++ b/test/CodeGen/ARM/fast-isel-cmp-imm.ll @@ -212,3 +212,20 @@ if.then: ; preds = %entry if.end: ; preds = %if.then, %entry ret void } + +define void @t12(i8 %a) uwtable ssp { +entry: +; ARM: t12 +; THUMB: t12 + %cmp = icmp ugt i8 %a, -113 +; ARM: cmp r{{[0-9]}}, #143 +; THUMB: cmp r{{[0-9]}}, #143 + br i1 %cmp, label %if.then, label %if.end + +if.then: ; preds = %entry + tail call void @foo() + br label %if.end + +if.end: ; preds = %if.then, %entry + ret void +} |