summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2017-09-06 03:08:26 +0000
committerHal Finkel <hfinkel@anl.gov>2017-09-06 03:08:26 +0000
commit112a6bac726658c7ebd73a4aaf2539fa67ffb9e4 (patch)
tree855d18be5b2d80412a673361edfed23adcf10868 /llvm/test
parenta69a3a3f6279f6deae7db595292c5f3f9d46add4 (diff)
downloadbcm5719-llvm-112a6bac726658c7ebd73a4aaf2539fa67ffb9e4.tar.gz
bcm5719-llvm-112a6bac726658c7ebd73a4aaf2539fa67ffb9e4.zip
[PowerPC] Don't use xscvdpspn on the P7
xscvdpspn was not introduced until the P8, so don't use it on the P7. Fixes a regression introduced in r288152. llvm-svn: 312612
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/PowerPC/fp-splat.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fp-splat.ll b/llvm/test/CodeGen/PowerPC/fp-splat.ll
new file mode 100644
index 00000000000..9b1ab21aaa4
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/fp-splat.ll
@@ -0,0 +1,27 @@
+; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-P8 -check-prefix=CHECK
+; RUN: llc -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-P7 -check-prefix=CHECK
+
+define <4 x float> @test1(float %a) {
+entry:
+; CHECK-LABEL: test1
+ %vecins = insertelement <4 x float> undef, float %a, i32 0
+ %vecins1 = insertelement <4 x float> %vecins, float %a, i32 1
+ %vecins2 = insertelement <4 x float> %vecins1, float %a, i32 2
+ %vecins3 = insertelement <4 x float> %vecins2, float %a, i32 3
+ ret <4 x float> %vecins3
+; CHECK-P8: xscvdpspn
+; CHECK-P7-NOT: xscvdpspn
+; CHECK: blr
+}
+
+define <2 x double> @test2(double %a) {
+entry:
+; CHECK-LABEL: test2
+ %vecins = insertelement <2 x double> undef, double %a, i32 0
+ %vecins1 = insertelement <2 x double> %vecins, double %a, i32 1
+ ret <2 x double> %vecins1
+; CHECK-P8: xxspltd
+; CHECK-P7: xxspltd
+; CHECK: blr
+}
+
OpenPOWER on IntegriCloud