1 ; RUN: llc -mtriple thumbv7--windows-itanium -filetype asm -o - %s | FileCheck %s
3 declare double @llvm.powi.f64(double, i32)
4 declare float @llvm.powi.f32(float, i32)
6 define arm_aapcs_vfpcc double @d(double %d, i32 %i) {
8 %0 = tail call double @llvm.powi.f64(double %d, i32 %i)
13 ; CHECK: vmov s[[REGISTER:[0-9]+]], r0
14 ; CHECK-NEXT: vcvt.f64.s32 d1, s[[REGISTER]]
16 ; CHECK-NOT: __powisf2
18 define arm_aapcs_vfpcc float @f(float %f, i32 %i) {
20 %0 = tail call float @llvm.powi.f32(float %f, i32 %i)
25 ; CHECK: vmov s[[REGISTER:[0-9]+]], r0
26 ; CHECK-NEXT: vcvt.f32.s32 s1, s[[REGISTER]]
28 ; CHECK-NOT: __powisf2
30 define arm_aapcs_vfpcc float @g(double %d, i32 %i) {
32 %0 = tail call double @llvm.powi.f64(double %d, i32 %i)
33 %conv = fptrunc double %0 to float
38 ; CHECK: vmov s[[REGISTER:[0-9]+]], r0
39 ; CHECK-NEXT: vcvt.f64.s32 d1, s[[REGISTER]]
41 ; CHECK-NOT: bl __powidf2
42 ; CHECK-NEXT: vcvt.f32.f64 s0, d0
44 define arm_aapcs_vfpcc double @h(float %f, i32 %i) {
46 %0 = tail call float @llvm.powi.f32(float %f, i32 %i)
47 %conv = fpext float %0 to double
52 ; CHECK: vmov s[[REGISTER:[0-9]+]], r0
53 ; CHECK-NEXT: vcvt.f32.s32 s1, s[[REGISTER]]
55 ; CHECK-NOT: bl __powisf2
56 ; CHECK-NEXT: vcvt.f64.f32 d0, s0