blob: a33b71c851ecce5dd8b1766a628fe6bd5f17551c [file] [log] [blame]
Tanya Lattner33eefff2008-02-21 07:42:26 +00001; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanb1576f52007-07-31 20:11:57 +00002; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
Tanya Lattner33eefff2008-02-21 07:42:26 +00003; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00004; RUN: not grep add
Chris Lattner94c8d3b2006-09-13 04:43:26 +00005
Tanya Lattner33eefff2008-02-21 07:42:26 +00006define i32 @test1(i32 %A, i32 %B) {
7 %tmp1 = shl i32 %A, 2 ; <i32> [#uses=1]
8 %tmp3 = add i32 %B, -5 ; <i32> [#uses=1]
9 %tmp4 = add i32 %tmp3, %tmp1 ; <i32> [#uses=1]
10 ret i32 %tmp4
Chris Lattner94c8d3b2006-09-13 04:43:26 +000011}
12
Tanya Lattner33eefff2008-02-21 07:42:26 +000013