diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-05-05 19:26:48 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-05-05 19:26:48 +0000 |
commit | cd808237b24c7d6d0bb7ddf577dba37c31a06a50 (patch) | |
tree | 3e15e263edd31135f4279f6cb05b48dac89ad513 /llvm/test/CodeGen/SystemZ/vec-move-04.ll | |
parent | ce4c10958502b8f852dd88496272d262345a2513 (diff) | |
download | bcm5719-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-04.ll')
-rw-r--r-- | llvm/test/CodeGen/SystemZ/vec-move-04.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/vec-move-04.ll b/llvm/test/CodeGen/SystemZ/vec-move-04.ll index f43c0b71491..4e75d21dc96 100644 --- a/llvm/test/CodeGen/SystemZ/vec-move-04.ll +++ b/llvm/test/CodeGen/SystemZ/vec-move-04.ll @@ -110,6 +110,34 @@ define <2 x i64> @f12(<2 x i64> %val, i64 %element, i32 %index) { ret <2 x i64> %ret } +; Test v2f64 insertion into the first element. +define <2 x double> @f16(<2 x double> %val, double %element) { +; CHECK-LABEL: f16: +; CHECK: vpdi %v24, %v0, %v24, 1 +; CHECK: br %r14 + %ret = insertelement <2 x double> %val, double %element, i32 0 + ret <2 x double> %ret +} + +; Test v2f64 insertion into the last element. +define <2 x double> @f17(<2 x double> %val, double %element) { +; CHECK-LABEL: f17: +; CHECK: vpdi %v24, %v24, %v0, 0 +; CHECK: br %r14 + %ret = insertelement <2 x double> %val, double %element, i32 1 + ret <2 x double> %ret +} + +; Test v2f64 insertion into a variable element. +define <2 x double> @f18(<2 x double> %val, double %element, i32 %index) { +; CHECK-LABEL: f18: +; CHECK: lgdr [[REG:%r[0-5]]], %f0 +; CHECK: vlvgg %v24, [[REG]], 0(%r2) +; CHECK: br %r14 + %ret = insertelement <2 x double> %val, double %element, i32 %index + ret <2 x double> %ret +} + ; Test v16i8 insertion into a variable element plus one. define <16 x i8> @f19(<16 x i8> %val, i8 %element, i32 %index) { ; CHECK-LABEL: f19: |