[llvm] r341575 - [x86] add tests for pow --> cbrt; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 11:42:55 PDT 2018


Author: spatel
Date: Thu Sep  6 11:42:55 2018
New Revision: 341575

URL: http://llvm.org/viewvc/llvm-project?rev=341575&view=rev
Log:
[x86] add tests for pow --> cbrt; NFC

Modified:
    llvm/trunk/test/CodeGen/X86/pow.ll

Modified: llvm/trunk/test/CodeGen/X86/pow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pow.ll?rev=341575&r1=341574&r2=341575&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pow.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pow.ll Thu Sep  6 11:42:55 2018
@@ -162,3 +162,27 @@ define <2 x double> @pow_v2f64_one_fourt
   ret <2 x double> %r
 }
 
+define float @pow_f32_one_third_fmf(float %x) nounwind {
+; CHECK-LABEL: pow_f32_one_third_fmf:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
+; CHECK-NEXT:    jmp powf # TAILCALL
+  %one = uitofp i32 1 to float
+  %three = uitofp i32 3 to float
+  %exp = fdiv float %one, %three
+  %r = call nsz nnan ninf afn float @llvm.pow.f32(float %x, float %exp)
+  ret float %r
+}
+
+define double @pow_f64_one_third_fmf(double %x) nounwind {
+; CHECK-LABEL: pow_f64_one_third_fmf:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movsd {{.*#+}} xmm1 = mem[0],zero
+; CHECK-NEXT:    jmp pow # TAILCALL
+  %one = uitofp i32 1 to double
+  %three = uitofp i32 3 to double
+  %exp = fdiv double %one, %three
+  %r = call nsz nnan ninf afn double @llvm.pow.f64(double %x, double %exp)
+  ret double %r
+}
+




More information about the llvm-commits mailing list