1 ; RUN: llc -mtriple=arm-eabi -mattr=+v6 %s -o - | FileCheck %s -check-prefix=V6
2 ; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s -check-prefix=V4
3 ; RUN: llc -mtriple=thumb-eabi -mcpu=cortex-m3 %s -o - | FileCheck %s -check-prefix=M3
5 define i32 @smulhi(i32 %x, i32 %y) nounwind {
14 %tmp = sext i32 %x to i64 ; <i64> [#uses=1]
15 %tmp1 = sext i32 %y to i64 ; <i64> [#uses=1]
16 %tmp2 = mul i64 %tmp1, %tmp ; <i64> [#uses=1]
17 %tmp3 = lshr i64 %tmp2, 32 ; <i64> [#uses=1]
18 %tmp3.upgrd.1 = trunc i64 %tmp3 to i32 ; <i32> [#uses=1]
22 define i32 @umulhi(i32 %x, i32 %y) nounwind {
31 %tmp = zext i32 %x to i64 ; <i64> [#uses=1]
32 %tmp1 = zext i32 %y to i64 ; <i64> [#uses=1]
33 %tmp2 = mul i64 %tmp1, %tmp ; <i64> [#uses=1]
34 %tmp3 = lshr i64 %tmp2, 32 ; <i64> [#uses=1]
35 %tmp3.upgrd.2 = trunc i64 %tmp3 to i32 ; <i32> [#uses=1]
40 define i32 @t3(i32 %a) nounwind {
51 %tmp1 = mul nsw i32 %a, 3
52 %tmp2 = sdiv i32 %tmp1, 23