blob: 7673124d5dda93a54ed8bf2a991cfa162ad6e230 [file] [log] [blame]
Jan Wen Voung6dc30762013-03-12 16:27:52 +00001; REQUIRES: asserts
Chandler Carruth5da53432012-07-02 18:37:59 +00002; RUN: llc < %s -march=x86 -stats 2>&1 | \
Reid Spencer86f337e2007-04-16 15:15:52 +00003; RUN: grep asm-printer | grep 7
Evan Cheng99297932006-03-03 18:58:09 +00004
Dale Johannesen0de94a12008-03-31 23:20:09 +00005define i32 @g(i32 %a, i32 %b) nounwind {
Tanya Lattner8bf97c22008-03-25 04:26:08 +00006 %tmp.1 = shl i32 %b, 1 ; <i32> [#uses=1]
7 %tmp.3 = add i32 %tmp.1, %a ; <i32> [#uses=1]
8 %tmp.5 = mul i32 %tmp.3, %a ; <i32> [#uses=1]
9 %tmp.8 = mul i32 %b, %b ; <i32> [#uses=1]
10 %tmp.9 = add i32 %tmp.5, %tmp.8 ; <i32> [#uses=1]
11 ret i32 %tmp.9
Evan Cheng99297932006-03-03 18:58:09 +000012}
Tanya Lattner8bf97c22008-03-25 04:26:08 +000013