New test case: use lea for imul by some constants.
authorEvan Cheng <evan.cheng@apple.com>
Sat, 25 Feb 2006 10:16:10 +0000 (10:16 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sat, 25 Feb 2006 10:16:10 +0000 (10:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26378 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/imul-lea.ll [new file with mode: 0644]
test/CodeGen/X86/store-global-address.ll [new file with mode: 0644]

diff --git a/test/CodeGen/X86/imul-lea.ll b/test/CodeGen/X86/imul-lea.ll
new file mode 100644 (file)
index 0000000..6f2e3a9
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep lea
+
+declare int %foo()
+int %test() {
+       %tmp.0 = tail call int %foo( )          ; <int> [#uses=1]
+       %tmp.1 = mul int %tmp.0, 9              ; <int> [#uses=1]
+       ret int %tmp.1
+}
diff --git a/test/CodeGen/X86/store-global-address.ll b/test/CodeGen/X86/store-global-address.ll
new file mode 100644 (file)
index 0000000..c933714
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep movl | wc -l | grep 1
+
+%dst = global int 0
+%ptr = global int* null
+
+void %test() {
+       store int* %dst, int** %ptr
+       ret void
+}