case Intrinsic::rint:
case Intrinsic::round:
return true;
+ // These intrinsics do not correspond to any libm function, and
+ // do not set errno.
+ case Intrinsic::powi:
+ return true;
// TODO: are convert_{from,to}_fp16 safe?
// TODO: can we list target-specific intrinsics here?
default: break;
; CHECK: call float @llvm.copysign.f32
; CHECK: call float @llvm.minnum.f32
; CHECK: call float @llvm.maxnum.f32
+; CHECK: call float @llvm.powi.f32
; CHECK: for.body:
define void @test(float %arg1, float %arg2) {
%tmp.8 = call float @llvm.copysign.f32(float %tmp.7, float %arg2)
%tmp.9 = call float @llvm.minnum.f32(float %tmp.8, float %arg2)
%tmp.10 = call float @llvm.maxnum.f32(float %tmp.9, float %arg2)
- call void @consume(float %tmp.10)
+ %tmp.11 = call float @llvm.powi.f32(float %tmp.10, i32 4)
+ call void @consume(float %tmp.11)
%IND.new = add i32 %IND, 1
br label %for.head
declare float @llvm.copysign.f32(float, float)
declare float @llvm.minnum.f32(float, float)
declare float @llvm.maxnum.f32(float, float)
+declare float @llvm.powi.f32(float, i32)