[SimplifyCFG] Swap to using TargetTransformInfo for cost
[oota-llvm.git] / test / CodeGen / ARM / 2014-08-04-muls-it.ll
1 ; RUN: llc -mtriple thumbv7-eabi -arm-restrict-it -filetype asm -o - %s \
2 ; RUN:    | FileCheck %s
3
4 define arm_aapcscc i32 @function(i32 %i, i32 %j) {
5 entry:
6   %cmp = icmp eq i32 %i, %j
7   br i1 %cmp, label %if.then, label %if.end
8
9 if.then:                                          ; preds = %entry
10   %mul = mul nsw i32 %i, %i
11   br label %if.end
12
13 if.end:                                           ; preds = %if.then, %entry
14   %i.addr.0 = phi i32 [ %mul, %if.then ], [ %i, %entry ]
15   ret i32 %i.addr.0
16 }
17
18 ; CHECK-LABEL: function
19 ; CHECK: cmp r0, r1
20 ; CHECK-NOT: mulseq r0, r0, r0
21 ; CHECK: muleq r0, r0, r0
22 ; CHECK: bx lr
23