blob: 69303507d6e6cedd12b4d20ebf88587dc9bfd718 [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
Dan Gohman91888f02007-07-31 20:11:57 +00002; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
Dan Gohman0a063102009-09-08 23:54:48 +00003; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004; RUN: not grep add
5
Tanya Lattner632e88a2008-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
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011}
12
Tanya Lattner632e88a2008-02-21 07:42:26 +000013