brintos

brintos / llvm-project-archived public Read only

0
0
Text · 872 B · e038b09 Raw
25 lines · plain
1; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2,+dsp %s -o - |  FileCheck %s2 3@x = weak global i16 0          ; <ptr> [#uses=1]4@y = weak global i16 0          ; <ptr> [#uses=0]5 6define i32 @f1(i32 %y) {7; CHECK: f18; CHECK: smulbt r0, r1, r09        %tmp = load i16, ptr @x             ; <i16> [#uses=1]10        %tmp1 = add i16 %tmp, 2         ; <i16> [#uses=1]11        %tmp2 = sext i16 %tmp1 to i32           ; <i32> [#uses=1]12        %tmp3 = ashr i32 %y, 16         ; <i32> [#uses=1]13        %tmp4 = mul i32 %tmp2, %tmp3            ; <i32> [#uses=1]14        ret i32 %tmp415}16 17define i32 @f2(i32 %x, i32 %y) {18; CHECK: f219; CHECK: smultt r0, r1, r020        %tmp1 = ashr i32 %x, 16         ; <i32> [#uses=1]21        %tmp3 = ashr i32 %y, 16         ; <i32> [#uses=1]22        %tmp4 = mul i32 %tmp3, %tmp1            ; <i32> [#uses=1]23        ret i32 %tmp424}25