Chris Lattner | 94c8d3b | 2006-09-13 04:43:26 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'lea EAX, DWORD PTR \[... + 4\*... - 5\]' && |
2 | ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep add | ||||
3 | |||||
4 | int %test1(int %A, int %B) { | ||||
5 | %tmp1 = shl int %A, ubyte 2 ; <int> [#uses=1] | ||||
6 | %tmp3 = add int %B, -5 ; <int> [#uses=1] | ||||
7 | %tmp4 = add int %tmp3, %tmp1 ; <int> [#uses=1] | ||||
8 | ret int %tmp4 | ||||
9 | } | ||||
10 |