blob: 69303507d6e6cedd12b4d20ebf88587dc9bfd718 [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanb1576f52007-07-31 20:11:57 +00002; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
Dan Gohman36a09472009-09-08 23:54:48 +00003; RUN: llc < %s -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