summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-05-30 06:53:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-05-30 06:53:55 +0000
commitdc7dd9719d67cbc9f99d72cf452a6392f1bc56fe (patch)
tree285d335fcc3feafd095c79227900a31a1262f1d4 /test
parent8c65fa564acee3d1ca81e932f05433b382443b22 (diff)
downloadllvm-dc7dd9719d67cbc9f99d72cf452a6392f1bc56fe.tar.gz
llvm-dc7dd9719d67cbc9f99d72cf452a6392f1bc56fe.tar.bz2
llvm-dc7dd9719d67cbc9f99d72cf452a6392f1bc56fe.tar.xz
Add a lea instruction selection test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/lea.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/X86/lea.ll b/test/CodeGen/X86/lea.ll
new file mode 100644
index 0000000000..dcbf73ea31
--- /dev/null
+++ b/test/CodeGen/X86/lea.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-as < %s | llc -march=x86 | not grep orl
+int %test(int %x) {
+ %tmp1 = shl int %x, ubyte 3
+ %tmp2 = add int %tmp1, 7
+ ret int %tmp2
+}