1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s 2 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 \ 3 ; RUN: -arm-use-mulops=false %s -o - | FileCheck %s -check-prefix=NO_MULOPS 4 5 define i32 @f1(i32 %a, i32 %b, i32 %c) { 6 %tmp1 = mul i32 %a, %b 7 %tmp2 = add i32 %c, %tmp1 8 ret i32 %tmp2 9 } 10 ; CHECK-LABEL: f1: 11 ; CHECK: mla r0, r0, r1, r2 12 ; NO_MULOPS-LABEL: f1: 13 ; NO_MULOPS: muls r0, r1, r0 14 ; NO_MULOPS-NEXT: add r0, r2 15 16 define i32 @f2(i32 %a, i32 %b, i32 %c) { 17 %tmp1 = mul i32 %a, %b 18 %tmp2 = add i32 %tmp1, %c 19 ret i32 %tmp2 20 } 21 ; CHECK-LABEL: f2: 22 ; CHECK: mla r0, r0, r1, r2 23 ; NO_MULOPS-LABEL: f2: 24 ; NO_MULOPS: muls r0, r1, r0 25 ; NO_MULOPS-NEXT: add r0, r2 26