summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/vec-move-09.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-move-09.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-move-09.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/vec-move-09.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/vec-move-09.ll b/llvm/test/CodeGen/SystemZ/vec-move-09.ll
index 7863e4305f9..78c5454fb55 100644
--- a/llvm/test/CodeGen/SystemZ/vec-move-09.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-move-09.ll
@@ -235,3 +235,30 @@ define <2 x i64> @f26(<2 x i64> %val, i32 %index) {
%ret = insertelement <2 x i64> %val, i64 0, i32 %index
ret <2 x i64> %ret
}
+
+; Test v2f64 insertion of 0 into the first element.
+define <2 x double> @f30(<2 x double> %val) {
+; CHECK-LABEL: f30:
+; CHECK: vleig %v24, 0, 0
+; CHECK: br %r14
+ %ret = insertelement <2 x double> %val, double 0.0, i32 0
+ ret <2 x double> %ret
+}
+
+; Test v2f64 insertion of 0 into the last element.
+define <2 x double> @f31(<2 x double> %val) {
+; CHECK-LABEL: f31:
+; CHECK: vleig %v24, 0, 1
+; CHECK: br %r14
+ %ret = insertelement <2 x double> %val, double 0.0, i32 1
+ ret <2 x double> %ret
+}
+
+; Test v2f64 insertion of a nonzero value.
+define <2 x double> @f32(<2 x double> %val) {
+; CHECK-LABEL: f32:
+; CHECK-NOT: vleig
+; CHECK: br %r14
+ %ret = insertelement <2 x double> %val, double 1.0, i32 1
+ ret <2 x double> %ret
+}
OpenPOWER on IntegriCloud