blob: 5ddaf9353f92d258f3eb6169a8e93278ff59a0c3 [file] [log] [blame]
Artyom Skrobov5a6e3942015-10-23 17:19:19 +00001; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2,+t2xtpk,+dsp %s -o - | FileCheck %s
2; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2,+t2xtpk,+dsp -arm-use-mulops=false %s -o - | FileCheck %s -check-prefix=NO_MULOPS
Evan Chengb24e51e2009-07-07 01:17:28 +00003
4define i32 @f3(i32 %a, i16 %x, i32 %y) {
Jim Grosbach0ad7efba2009-11-17 00:20:26 +00005; CHECK: f3
6; CHECK: smlabt r0, r1, r2, r0
Bob Wilsone8a549c2012-09-29 21:43:49 +00007; NO_MULOPS: f3
8; NO_MULOPS: smultb r1, r2, r1
9; NO_MULOPS-NEXT: add r0, r1
Evan Chengb24e51e2009-07-07 01:17:28 +000010 %tmp = sext i16 %x to i32 ; <i32> [#uses=1]
11 %tmp2 = ashr i32 %y, 16 ; <i32> [#uses=1]
12 %tmp3 = mul i32 %tmp2, %tmp ; <i32> [#uses=1]
13 %tmp5 = add i32 %tmp3, %a ; <i32> [#uses=1]
14 ret i32 %tmp5
15}