Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \ |
Dan Gohman | b1576f5 | 2007-07-31 20:11:57 +0000 | [diff] [blame] | 2 | ; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]} |
Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 3 | ; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \ |
Reid Spencer | d3b1f6d | 2007-04-15 22:20:47 +0000 | [diff] [blame] | 4 | ; RUN: not grep add |
Chris Lattner | 94c8d3b | 2006-09-13 04:43:26 +0000 | [diff] [blame] | 5 | |
Tanya Lattner | 33eefff | 2008-02-21 07:42:26 +0000 | [diff] [blame] | 6 | define 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 Lattner | 94c8d3b | 2006-09-13 04:43:26 +0000 | [diff] [blame] | 11 | } |
| 12 | |
Tanya Lattner | 33eefff | 2008-02-21 07:42:26 +0000 | [diff] [blame] | 13 | |