1 ; RUN: llc < %s -march=arm -mattr=+v6t2 | FileCheck %s
2 ; RUN: llc < %s -march=arm -mattr=+v6t2 -arm-use-mulops=false | FileCheck %s -check-prefix=NO_MULOPS
4 define i32 @f1(i32 %a, i32 %b, i32 %c) {
6 %tmp2 = sub i32 %c, %tmp1
10 ; sub doesn't commute, so no mls for this one
11 define i32 @f2(i32 %a, i32 %b, i32 %c) {
12 %tmp1 = mul i32 %a, %b
13 %tmp2 = sub i32 %tmp1, %c
18 ; CHECK: mls r0, r0, r1, r2
19 ; NO_MULOPS-LABEL: f1:
20 ; NO_MULOPS: mul r0, r0, r1
21 ; NO_MULOPS-NEXT: sub r0, r2, r0
24 ; CHECK: mul r0, r0, r1
25 ; CHECK-NEXT: sub r0, r0, r2
26 ; NO_MULOPS-LABEL: f2:
27 ; NO_MULOPS: mul r0, r0, r1
28 ; NO_MULOPS-NEXT: sub r0, r0, r2