summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-03-27 22:22:48 +0000
committerHal Finkel <hfinkel@anl.gov>2014-03-27 22:22:48 +0000
commit6bdc4ebedd16bc2102edc4bfbc63c76c7c130ef0 (patch)
treee8331809bc0c239253703bf7abe9a722d5ab82eb /test/CodeGen
parent72f0f26d3b595d76d86f886d01caf8d9cad13bd4 (diff)
downloadllvm-6bdc4ebedd16bc2102edc4bfbc63c76c7c130ef0.tar.gz
llvm-6bdc4ebedd16bc2102edc4bfbc63c76c7c130ef0.tar.bz2
llvm-6bdc4ebedd16bc2102edc4bfbc63c76c7c130ef0.tar.xz
[PowerPC] Fix v2f64 vector extract and related patterns
First, v2f64 vector extract had not been declared legal (and so the existing patterns were not being used). Second, the patterns for that, and for scalar_to_vector, should really be a regclass copy, not a subregister operation, because the VSX registers directly hold both the vector and scalar data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/PowerPC/vsx.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/vsx.ll b/test/CodeGen/PowerPC/vsx.ll
index 89499560b3..4f4f816d72 100644
--- a/test/CodeGen/PowerPC/vsx.ll
+++ b/test/CodeGen/PowerPC/vsx.ll
@@ -529,3 +529,21 @@ define <2 x i64> @test62(<2 x i64> %a, <2 x i64> %b) {
; CHECK: blr
}
+define double @test63(<2 x double> %a) {
+ %v = extractelement <2 x double> %a, i32 0
+ ret double %v
+
+; CHECK-LABEL: @test63
+; CHECK: xxlor 1, 34, 34
+; CHECK: blr
+}
+
+define double @test64(<2 x double> %a) {
+ %v = extractelement <2 x double> %a, i32 1
+ ret double %v
+
+; CHECK-LABEL: @test64
+; CHECK: xxpermdi 1, 34, 34, 2
+; CHECK: blr
+}
+