diff options
author | Dan Gohman <gohman@apple.com> | 2007-09-17 14:49:27 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-09-17 14:49:27 +0000 |
commit | 5f6913cecd9f760c02754772cb57fa4d9a96624f (patch) | |
tree | 8df4f05f0cd6c727e0ea21516454c1e66e27cc94 /test | |
parent | 11f7bfbb834e42cd53a81a84a1dfc118ae17c9c5 (diff) | |
download | external_llvm-5f6913cecd9f760c02754772cb57fa4d9a96624f.zip external_llvm-5f6913cecd9f760c02754772cb57fa4d9a96624f.tar.gz external_llvm-5f6913cecd9f760c02754772cb57fa4d9a96624f.tar.bz2 |
Emit integer x<1 as x<=0, as comparisons with zero (now includeing
64-bit) can use test instead of cmp with an immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/cmp1.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/X86/cmp1.ll b/test/CodeGen/X86/cmp1.ll new file mode 100644 index 0000000..241618c --- /dev/null +++ b/test/CodeGen/X86/cmp1.ll @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep -v cmp + +define i64 @foo(i64 %x) { + %t = icmp slt i64 %x, 1 + %r = zext i1 %t to i64 + ret i64 %r +} |