From: Chris Lattner Date: Wed, 13 Sep 2006 04:43:26 +0000 (+0000) Subject: New testcase X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=94c8d3b5e5d29b4f813a4fcd93f5c0a865148512;p=oota-llvm.git New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30287 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/lea-2.ll b/test/CodeGen/X86/lea-2.ll new file mode 100644 index 00000000000..ad510c072e8 --- /dev/null +++ b/test/CodeGen/X86/lea-2.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'lea EAX, DWORD PTR \[... + 4\*... - 5\]' && +; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep add + +int %test1(int %A, int %B) { + %tmp1 = shl int %A, ubyte 2 ; [#uses=1] + %tmp3 = add int %B, -5 ; [#uses=1] + %tmp4 = add int %tmp3, %tmp1 ; [#uses=1] + ret int %tmp4 +} +