[llvm] r244630 - add missing tests for powi expansion with size optimizations
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 09:58:49 PDT 2015
Author: spatel
Date: Tue Aug 11 11:58:49 2015
New Revision: 244630
URL: http://llvm.org/viewvc/llvm-project?rev=244630&view=rev
Log:
add missing tests for powi expansion with size optimizations
The minsize test will be fixed in the next commit.
Modified:
llvm/trunk/test/CodeGen/X86/powi.ll
Modified: llvm/trunk/test/CodeGen/X86/powi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/powi.ll?rev=244630&r1=244629&r2=244630&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/powi.ll (original)
+++ llvm/trunk/test/CodeGen/X86/powi.ll Tue Aug 11 11:58:49 2015
@@ -17,5 +17,32 @@ define double @pow_wrapper(double %a) no
ret double %ret
}
+define double @pow_wrapper_optsize(double %a) optsize {
+; CHECK-LABEL: pow_wrapper_optsize:
+; CHECK: # BB#0:
+; CHECK-NEXT: movl $15, %edi
+; CHECK-NEXT: jmp
+ %ret = tail call double @llvm.powi.f64(double %a, i32 15) nounwind ; <double> [#uses=1]
+ ret double %ret
+}
+
+; FIXME: Should not expand with minsize
+
+define double @pow_wrapper_minsize(double %a) minsize {
+; CHECK-LABEL: pow_wrapper_minsize:
+; CHECK: # BB#0:
+; CHECK-NEXT: movapd %xmm0, %xmm1
+; CHECK-NEXT: mulsd %xmm1, %xmm1
+; CHECK-NEXT: mulsd %xmm1, %xmm0
+; CHECK-NEXT: mulsd %xmm1, %xmm1
+; CHECK-NEXT: mulsd %xmm1, %xmm0
+; CHECK-NEXT: mulsd %xmm1, %xmm1
+; CHECK-NEXT: mulsd %xmm0, %xmm1
+; CHECK-NEXT: movapd %xmm1, %xmm0
+; CHECK-NEXT: retq
+ %ret = tail call double @llvm.powi.f64(double %a, i32 15) nounwind ; <double> [#uses=1]
+ ret double %ret
+}
+
declare double @llvm.powi.f64(double, i32) nounwind readonly
More information about the llvm-commits
mailing list