summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/vec-perm-03.ll
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2015-05-05 19:26:48 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2015-05-05 19:26:48 +0000
commitcd808237b24c7d6d0bb7ddf577dba37c31a06a50 (patch)
tree3e15e263edd31135f4279f6cb05b48dac89ad513 /llvm/test/CodeGen/SystemZ/vec-perm-03.ll
parentce4c10958502b8f852dd88496272d262345a2513 (diff)
downloadbcm5719-llvm-cd808237b24c7d6d0bb7ddf577dba37c31a06a50.tar.gz
bcm5719-llvm-cd808237b24c7d6d0bb7ddf577dba37c31a06a50.zip
[SystemZ] Add CodeGen support for v2f64
This adds ABI and CodeGen support for the v2f64 type, which is natively supported by z13 instructions. Based on a patch by Richard Sandiford. llvm-svn: 236522
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/vec-perm-03.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/vec-perm-03.ll40
1 files changed, 40 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/vec-perm-03.ll b/llvm/test/CodeGen/SystemZ/vec-perm-03.ll
index d74948bdb51..c30a87601a4 100644
--- a/llvm/test/CodeGen/SystemZ/vec-perm-03.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-perm-03.ll
@@ -158,6 +158,46 @@ define <2 x i64> @f12(i64 *%base) {
ret <2 x i64> %ret
}
+
+; Test a v2f64 replicating load with no offset.
+define <2 x double> @f16(double *%ptr) {
+; CHECK-LABEL: f16:
+; CHECK: vlrepg %v24, 0(%r2)
+; CHECK: br %r14
+ %scalar = load double, double *%ptr
+ %val = insertelement <2 x double> undef, double %scalar, i32 0
+ %ret = shufflevector <2 x double> %val, <2 x double> undef,
+ <2 x i32> zeroinitializer
+ ret <2 x double> %ret
+}
+
+; Test a v2f64 replicating load with the maximum in-range offset.
+define <2 x double> @f17(double *%base) {
+; CHECK-LABEL: f17:
+; CHECK: vlrepg %v24, 4088(%r2)
+; CHECK: br %r14
+ %ptr = getelementptr double, double *%base, i32 511
+ %scalar = load double, double *%ptr
+ %val = insertelement <2 x double> undef, double %scalar, i32 0
+ %ret = shufflevector <2 x double> %val, <2 x double> undef,
+ <2 x i32> zeroinitializer
+ ret <2 x double> %ret
+}
+
+; Test a v2f64 replicating load with the first out-of-range offset.
+define <2 x double> @f18(double *%base) {
+; CHECK-LABEL: f18:
+; CHECK: aghi %r2, 4096
+; CHECK: vlrepg %v24, 0(%r2)
+; CHECK: br %r14
+ %ptr = getelementptr double, double *%base, i32 512
+ %scalar = load double, double *%ptr
+ %val = insertelement <2 x double> undef, double %scalar, i32 0
+ %ret = shufflevector <2 x double> %val, <2 x double> undef,
+ <2 x i32> zeroinitializer
+ ret <2 x double> %ret
+}
+
; Test a v16i8 replicating load with an index.
define <16 x i8> @f19(i8 *%base, i64 %index) {
; CHECK-LABEL: f19:
OpenPOWER on IntegriCloud