brintos

brintos / llvm-project-archived public Read only

0
0
Text · 920 B · de7327e Raw
39 lines · plain
1; RUN: llc -mtriple=arm-eabi        %s -o - | FileCheck %s2; RUN: llc -mtriple=thumbv7-windows %s -o - | FileCheck %s -check-prefix=CHECK-WIN3 4; The Windows runtime doesn't have these.5; CHECK-WIN-NOT: __ashldi36; CHECK-WIN-NOT: __ashrdi37; CHECK-WIN-NOT: __lshrdi38 9define i64 @f0(i64 %val, i64 %amt) minsize optsize {10; CHECK-LABEL:   f0:11; CHECK:         bl  __aeabi_llsl12  %res = shl i64 %val, %amt13  ret i64 %res14}15 16define i32 @f1(i64 %x, i64 %y) minsize optsize {17; CHECK-LABEL:   f1:18; CHECK:         bl  __aeabi_llsl19	%a = shl i64 %x, %y20	%b = trunc i64 %a to i3221	ret i32 %b22}23 24define i32 @f2(i64 %x, i64 %y) minsize optsize {25; CHECK-LABEL:   f2:26; CHECK:         bl  __aeabi_lasr27	%a = ashr i64 %x, %y28	%b = trunc i64 %a to i3229	ret i32 %b30}31 32define i32 @f3(i64 %x, i64 %y) minsize optsize {33; CHECK-LABEL:   f3:34; CHECK:         bl  __aeabi_llsr35	%a = lshr i64 %x, %y36	%b = trunc i64 %a to i3237	ret i32 %b38}39