diff options
author | Dan Gohman <djg@cray.com> | 2007-09-17 14:49:27 +0000 |
---|---|---|
committer | Dan Gohman <djg@cray.com> | 2007-09-17 14:49:27 +0000 |
commit | 37b3426a0bc2e9e4166dcbd0f75d033651eff04a (patch) | |
tree | 8df4f05f0cd6c727e0ea21516454c1e66e27cc94 /test | |
parent | ec59604694230a73c4f272cc3acb46efb8110586 (diff) | |
download | external_llvm-37b3426a0bc2e9e4166dcbd0f75d033651eff04a.zip external_llvm-37b3426a0bc2e9e4166dcbd0f75d033651eff04a.tar.gz external_llvm-37b3426a0bc2e9e4166dcbd0f75d033651eff04a.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 +} |