summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/twoaddr-lea.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-03-02 01:08:17 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-03-02 01:08:17 +0000
commitf06e6c2ba717429936908254d53fa579bc941388 (patch)
treeaa486bf693b76f230ec7814ebc985aac0a5aa792 /test/CodeGen/X86/twoaddr-lea.ll
parentd3fdaeb69a25bcd21914b80f75606e2c2f1b35c8 (diff)
downloadllvm-f06e6c2ba717429936908254d53fa579bc941388.tar.gz
llvm-f06e6c2ba717429936908254d53fa579bc941388.tar.bz2
llvm-f06e6c2ba717429936908254d53fa579bc941388.tar.xz
Catch more cases where 2-address pass should 3-addressify instructions. rdar://9002648.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/twoaddr-lea.ll')
-rw-r--r--test/CodeGen/X86/twoaddr-lea.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/twoaddr-lea.ll b/test/CodeGen/X86/twoaddr-lea.ll
index ec16dfe172..a1d797feea 100644
--- a/test/CodeGen/X86/twoaddr-lea.ll
+++ b/test/CodeGen/X86/twoaddr-lea.ll
@@ -34,3 +34,14 @@ entry:
%add5 = add i32 %add3, %d
ret i32 %add5
}
+
+; rdar://9002648
+define i64 @test3(i64 %x) nounwind readnone ssp {
+entry:
+; CHECK: test3:
+; CHECK: leaq (%rdi,%rdi), %rax
+; CHECK-NOT: addq
+; CHECK-NEXT: ret
+ %0 = shl i64 %x, 1
+ ret i64 %0
+}