blob: a9e1f175238f6946021d65a96ffe55d7541c8c10 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
Dan Gohman91888f02007-07-31 20:11:57 +00002; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003; 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