summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-08-11 16:58:49 +0000
committerSanjay Patel <spatel@rotateright.com>2015-08-11 16:58:49 +0000
commitcaddda56aa87649653684e7f3b13963d9f506be8 (patch)
treefa1c4314efb1210cbbf840cb1c60cbe9fe4884b6 /llvm/test
parent46ed25e19917c6c24e8729ea03f8a33934d9f524 (diff)
downloadbcm5719-llvm-caddda56aa87649653684e7f3b13963d9f506be8.tar.gz
bcm5719-llvm-caddda56aa87649653684e7f3b13963d9f506be8.zip
add missing tests for powi expansion with size optimizations
The minsize test will be fixed in the next commit. llvm-svn: 244630
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/powi.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/powi.ll b/llvm/test/CodeGen/X86/powi.ll
index 623696057ca..bb1cf4fd7f9 100644
--- a/llvm/test/CodeGen/X86/powi.ll
+++ b/llvm/test/CodeGen/X86/powi.ll
@@ -17,5 +17,32 @@ define double @pow_wrapper(double %a) nounwind readonly ssp noredzone {
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
OpenPOWER on IntegriCloud