blob: ad510c072e87427d11c542239b4b93dc7f9cf4ad [file] [log] [blame]
Chris Lattner94c8d3b2006-09-13 04:43:26 +00001; 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
4int %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