summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-02-25 10:16:10 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-02-25 10:16:10 +0000
commit9394514eded0a07b2686b6cdb6fada73fe4a2621 (patch)
tree98905b6e1beee270d6dd2938b32612fc54fbd5e4
parentc6d80a4ecfa0345607f7466c7f285831f370b516 (diff)
downloadllvm-9394514eded0a07b2686b6cdb6fada73fe4a2621.tar.gz
llvm-9394514eded0a07b2686b6cdb6fada73fe4a2621.tar.bz2
llvm-9394514eded0a07b2686b6cdb6fada73fe4a2621.tar.xz
New test case: use lea for imul by some constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26378 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/imul-lea.ll8
-rw-r--r--test/CodeGen/X86/store-global-address.ll9
2 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/imul-lea.ll b/test/CodeGen/X86/imul-lea.ll
new file mode 100644
index 0000000000..6f2e3a986e
--- /dev/null
+++ b/test/CodeGen/X86/imul-lea.ll
@@ -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
index 0000000000..c933714ea6
--- /dev/null
+++ b/test/CodeGen/X86/store-global-address.ll
@@ -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
+}