blob: a9e1f175238f6946021d65a96ffe55d7541c8c10 [file] [log] [blame]
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanb1576f52007-07-31 20:11:57 +00002; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00003; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
4; RUN: not grep add
Chris Lattner94c8d3b2006-09-13 04:43:26 +00005
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