blob: 823bdb50a637e49ac3ddd624a83ea474ed0cb19d [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
2; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
3; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
4; RUN: not grep add
5
6int %test1(int %A, int %B) {
7 %tmp1 = shl int %A, ubyte 2 ; <int> [#uses=1]
8 %tmp3 = add int %B, -5 ; <int> [#uses=1]
9 %tmp4 = add int %tmp3, %tmp1 ; <int> [#uses=1]
10 ret int %tmp4
11}
12