From 7789e938b6c0b5d983504f6e3324c3d42ba11397 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 13 Sep 2006 04:43:26 +0000 Subject: [PATCH] New testcase llvm-svn: 30287 --- llvm/test/Regression/CodeGen/X86/lea-2.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 llvm/test/Regression/CodeGen/X86/lea-2.ll diff --git a/llvm/test/Regression/CodeGen/X86/lea-2.ll b/llvm/test/Regression/CodeGen/X86/lea-2.ll new file mode 100644 index 000000000000..ad510c072e87 --- /dev/null +++ b/llvm/test/Regression/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 +} +