summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/lxvw4x-bug.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
commita941fe247ef597fbc9f449adb8bc02f5a9e32863 (patch)
tree82b06a913ddadb0590e41b1df90fff5f139ac1b5 /test/CodeGen/PowerPC/lxvw4x-bug.ll
parent5b1a39068cd1fcf0668f9d818faf77b7a8ac7608 (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/lxvw4x-bug.ll')
-rw-r--r--test/CodeGen/PowerPC/lxvw4x-bug.ll13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/CodeGen/PowerPC/lxvw4x-bug.ll b/test/CodeGen/PowerPC/lxvw4x-bug.ll
index 9390819d560..33185671d40 100644
--- a/test/CodeGen/PowerPC/lxvw4x-bug.ll
+++ b/test/CodeGen/PowerPC/lxvw4x-bug.ll
@@ -1,4 +1,13 @@
-; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr8 \
+; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
+
+; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr9 \
+; RUN: -mtriple=powerpc64le-unknown-unknown < %s \
+; RUN: | FileCheck %s --check-prefix=CHECK-P9 --implicit-check-not xxswapd
+
+; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr9 -mattr=-power9-vector \
+; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
+
; Function Attrs: nounwind
define void @test() {
entry:
@@ -17,6 +26,8 @@ entry:
; CHECK: lwa [[REG0:[0-9]+]],
; CHECK: lxvd2x [[REG1:[0-9]+]], {{[0-9]+}}, [[REG0]]
; CHECK: xxswapd [[REG1]], [[REG1]]
+; CHECK-P9: lwa [[REG0:[0-9]+]],
+; CHECK-P9: lxvx [[REG1:[0-9]+]], {{[0-9]+}}, [[REG0]]
store <4 x i32> %4, <4 x i32>* %j, align 16
ret void
}