Home | History | Annotate | Download | only in Thumb2
      1 ; RUN: llc < %s -march=thumb -mattr=+thumb2,+t2dsp | FileCheck %s
      2 
      3 define i32 @smulhi(i32 %x, i32 %y) {
      4 ; CHECK: smulhi
      5 ; CHECK: smmul r0, r1, r0
      6         %tmp = sext i32 %x to i64               ; <i64> [#uses=1]
      7         %tmp1 = sext i32 %y to i64              ; <i64> [#uses=1]
      8         %tmp2 = mul i64 %tmp1, %tmp             ; <i64> [#uses=1]
      9         %tmp3 = lshr i64 %tmp2, 32              ; <i64> [#uses=1]
     10         %tmp3.upgrd.1 = trunc i64 %tmp3 to i32          ; <i32> [#uses=1]
     11         ret i32 %tmp3.upgrd.1
     12 }
     13 
     14 define i32 @umulhi(i32 %x, i32 %y) {
     15 ; CHECK: umulhi
     16 ; CHECK: umull r1, r0, r1, r0
     17         %tmp = zext i32 %x to i64               ; <i64> [#uses=1]
     18         %tmp1 = zext i32 %y to i64              ; <i64> [#uses=1]
     19         %tmp2 = mul i64 %tmp1, %tmp             ; <i64> [#uses=1]
     20         %tmp3 = lshr i64 %tmp2, 32              ; <i64> [#uses=1]
     21         %tmp3.upgrd.2 = trunc i64 %tmp3 to i32          ; <i32> [#uses=1]
     22         ret i32 %tmp3.upgrd.2
     23 }
     24