commit | 51d1929b9e1eacc63dfd02a737e5ce1e8475ba8b | [log] [tgz] |
---|---|---|
author | Dan Gohman <gohman@apple.com> | Mon Sep 17 14:35:24 2007 +0000 |
committer | Dan Gohman <gohman@apple.com> | Mon Sep 17 14:35:24 2007 +0000 |
tree | 44052c54d09229878f77685954527dffd0f19022 | |
parent | 73d534a2e0b2951b2178337f1ac928a3df7e0367 [diff] [blame] |
Use "test reg,reg" in place of "cmp reg,0" for 64-bit operands. This was previously only done for 32-bit and smaller operands. llvm-svn: 42024
diff --git a/llvm/test/CodeGen/X86/cmp0.ll b/llvm/test/CodeGen/X86/cmp0.ll new file mode 100644 index 0000000..f66f90c --- /dev/null +++ b/llvm/test/CodeGen/X86/cmp0.ll
@@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep -v cmp + +define i64 @foo(i64 %x) { + %t = icmp eq i64 %x, 0 + %r = zext i1 %t to i64 + ret i64 %r +}