summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/zext-inreg-1.ll
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/X86/zext-inreg-1.ll
downloadsrc-test-009b1c42aa6266385f2c37e227516b24077e6dd7.tar.gz
src-test-009b1c42aa6266385f2c37e227516b24077e6dd7.zip
Notes
Diffstat (limited to 'test/CodeGen/X86/zext-inreg-1.ll')
-rw-r--r--test/CodeGen/X86/zext-inreg-1.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/zext-inreg-1.ll b/test/CodeGen/X86/zext-inreg-1.ll
new file mode 100644
index 0000000000000..bc8e482d562de
--- /dev/null
+++ b/test/CodeGen/X86/zext-inreg-1.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc -march=x86 | not grep and
+
+; These tests differ from the ones in zext-inreg-0.ll in that
+; on x86-64 they do require and instructions.
+
+; These should use movzbl instead of 'and 255'.
+; This related to not having ZERO_EXTEND_REG node.
+
+define i64 @l(i64 %d) nounwind {
+ %e = add i64 %d, 1
+ %retval = and i64 %e, 1099511627775
+ ret i64 %retval
+}
+define i64 @m(i64 %d) nounwind {
+ %e = add i64 %d, 1
+ %retval = and i64 %e, 281474976710655
+ ret i64 %retval
+}