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-abs-05.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-abs-05.ll')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/vec-abs-05.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/vec-abs-05.ll b/llvm/test/CodeGen/SystemZ/vec-abs-05.ll new file mode 100644 index 00000000000..89142b21854 --- /dev/null +++ b/llvm/test/CodeGen/SystemZ/vec-abs-05.ll @@ -0,0 +1,24 @@ +; Test v2f64 absolute. +; +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s + +declare <2 x double> @llvm.fabs.v2f64(<2 x double>) + +; Test a plain absolute. +define <2 x double> @f1(<2 x double> %val) { +; CHECK-LABEL: f1: +; CHECK: vflpdb %v24, %v24 +; CHECK: br %r14 + %ret = call <2 x double> @llvm.fabs.v2f64(<2 x double> %val) + ret <2 x double> %ret +} + +; Test a negative absolute. +define <2 x double> @f2(<2 x double> %val) { +; CHECK-LABEL: f2: +; CHECK: vflndb %v24, %v24 +; CHECK: br %r14 + %abs = call <2 x double> @llvm.fabs.v2f64(<2 x double> %val) + %ret = fsub <2 x double> <double -0.0, double -0.0>, %abs + ret <2 x double> %ret +} |

