From: Hubert Tong Date: Tue, 22 Sep 2020 22:52:47 +0000 (-0400) Subject: [InstCombine][NFC][tests] Add ninf base value case to pow-sqrt.ll X-Git-Tag: llvmorg-13-init~11241 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a60852e9d692e3c38d9b58b7ec1679e07af2b8f7;p=platform%2Fupstream%2Fllvm.git [InstCombine][NFC][tests] Add ninf base value case to pow-sqrt.ll --- diff --git a/llvm/test/Transforms/InstCombine/pow-sqrt.ll b/llvm/test/Transforms/InstCombine/pow-sqrt.ll index 38f64d55..11fd576 100644 --- a/llvm/test/Transforms/InstCombine/pow-sqrt.ll +++ b/llvm/test/Transforms/InstCombine/pow-sqrt.ll @@ -70,6 +70,18 @@ define float @powf_intrinsic_half_fast(float %x) { ; If we can disregard INFs, no need for a select. +define double @pow_libcall_half_no_FMF_base_ninf(i32 %x) { +; CHECK-LABEL: @pow_libcall_half_no_FMF_base_ninf( +; CHECK-NEXT: [[CONV:%.*]] = uitofp i32 [[X:%.*]] to double +; CHECK-NEXT: [[SQRT:%.*]] = call double @sqrt(double [[CONV]]) +; CHECK-NEXT: [[ABS:%.*]] = call double @llvm.fabs.f64(double [[SQRT]]) +; CHECK-NEXT: ret double [[ABS]] +; + %conv = uitofp i32 %x to double + %pow = call double @pow(double %conv, double 5.0e-01) + ret double %pow +} + define double @pow_libcall_half_ninf(double %x) { ; CHECK-LABEL: @pow_libcall_half_ninf( ; CHECK-NEXT: [[SQRT:%.*]] = call ninf double @sqrt(double [[X:%.*]])