summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/vsx-ldst.ll
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-09-22 09:52:19 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-09-22 09:52:19 +0000
commit6e7879c5e6e26c2c6d00618f12af20012eecff41 (patch)
treee75271eca7c8a4f68a884aad96748b64ab021bb5 /llvm/test/CodeGen/PowerPC/vsx-ldst.ll
parent2ce2ab3a4dc1df6ec87a42aa2baa6741c2456e0c (diff)
downloadbcm5719-llvm-6e7879c5e6e26c2c6d00618f12af20012eecff41.tar.gz
bcm5719-llvm-6e7879c5e6e26c2c6d00618f12af20012eecff41.zip
[Power9] Add exploitation of non-permuting memory ops
This patch corresponds to review: https://reviews.llvm.org/D19825 The new lxvx/stxvx instructions do not require the swaps to line the elements up correctly. In order to select them over the lxvd2x/lxvw4x instructions which require swaps, the patterns for the old instruction have a predicate that ensures they won't be selected on Power9 and newer CPUs. llvm-svn: 282143
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/vsx-ldst.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/vsx-ldst.ll16
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/PowerPC/vsx-ldst.ll b/llvm/test/CodeGen/PowerPC/vsx-ldst.ll
index 3c06a3fdc34..a146182de99 100644
--- a/llvm/test/CodeGen/PowerPC/vsx-ldst.ll
+++ b/llvm/test/CodeGen/PowerPC/vsx-ldst.ll
@@ -1,18 +1,28 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O2 -mtriple=powerpc64-unknown-linux-gnu < %s > %t
+; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O2 \
+; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s > %t
; RUN: grep lxvw4x < %t | count 3
; RUN: grep lxvd2x < %t | count 3
; RUN: grep stxvw4x < %t | count 3
; RUN: grep stxvd2x < %t | count 3
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O0 -fast-isel=1 -mtriple=powerpc64-unknown-linux-gnu < %s > %t
+
+; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O0 -fast-isel=1 \
+; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s > %t
; RUN: grep lxvw4x < %t | count 3
; RUN: grep lxvd2x < %t | count 3
; RUN: grep stxvw4x < %t | count 3
; RUN: grep stxvd2x < %t | count 3
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O2 -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
+; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mattr=+vsx -O2 \
+; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
; RUN: grep lxvd2x < %t | count 6
; RUN: grep stxvd2x < %t | count 6
+; RUN: llc -verify-machineinstrs -mcpu=pwr9 -O2 \
+; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
+; RUN: grep lxvx < %t | count 6
+; RUN: grep stxvx < %t | count 6
+
+
@vsi = global <4 x i32> <i32 -1, i32 2, i32 -3, i32 4>, align 16
@vui = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16
@vf = global <4 x float> <float -1.500000e+00, float 2.500000e+00, float -3.500000e+00, float 4.500000e+00>, align 16
OpenPOWER on IntegriCloud