Skip to content

Commit b3ccc64

Browse files
committed
add stxvprl[l]
1 parent 0b600ab commit b3ccc64

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

llvm/lib/Target/PowerPC/PPCInstrFuture.td

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,18 @@ let Predicates = [HasVSX, IsISAFuture] in {
8383
}
8484
}
8585

86+
// Load VSX Vector with Right Length Left-justified.
8687
def : Pat<(v4i32 (int_ppc_vsx_lxvrl addr:$RA, i64:$RB)), (LXVRL $RA, $RB)>;
8788
def : Pat<(v4i32 (int_ppc_vsx_lxvrll addr:$RA, i64:$RB)), (LXVRLL $RA, $RB)>;
8889
def : Pat<(v256i1 (int_ppc_vsx_lxvprl addr:$RA, i64:$RB)), (LXVPRL $RA, $RB)>;
8990
def : Pat<(v256i1 (int_ppc_vsx_lxvprll addr:$RA, i64:$RB)), (LXVPRLL $RA, $RB)>;
90-
/*
91-
def : Pat<(int_ppc_vsx_stxvrl v256i1:$XT, addr:$RA, i64:$RB),
91+
92+
// Store VSX Vector with Right Length Left-justified.
93+
def : Pat<(int_ppc_vsx_stxvrl v4i32:$XT, addr:$RA, i64:$RB),
9294
(STXVRL $XT, $RA, $RB)>;
93-
*/
95+
def : Pat<(int_ppc_vsx_stxvrll v4i32:$XT, addr:$RA, i64:$RB),
96+
(STXVRLL $XT, $RA, $RB)>;
97+
def : Pat<(int_ppc_vsx_stxvprl v256i1:$XT, addr:$RA, i64:$RB),
98+
(STXVPRL $XT, $RA, $RB)>;
99+
def : Pat<(int_ppc_vsx_stxvprll v256i1:$XT, addr:$RA, i64:$RB),
100+
(STXVPRLL $XT, $RA, $RB)>;

llvm/test/CodeGen/PowerPC/vsx-ldst-with-length.ll

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
21
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
32
; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr -mcpu=future < %s | \
43
; RUN: FileCheck %s
@@ -50,3 +49,24 @@ entry:
5049
}
5150
declare <256 x i1> @llvm.ppc.vsx.lxvprll(ptr, i64)
5251

52+
define void @testSTXVRL(<4 x i32> %a, ptr %b, i64 %c) {
53+
; CHECK-LABEL: testSTXVRL:
54+
; CHECK: # %bb.0: # %entry
55+
; CHECK-NEXT: stxvrl v2, [[REG:r[0-9]+]], [[REG1:r[0-9]+]]
56+
; CHECK: blr
57+
entry:
58+
tail call void @llvm.ppc.vsx.stxvrl(<4 x i32> %a, ptr %b, i64 %c)
59+
ret void
60+
}
61+
declare void @llvm.ppc.vsx.stxvrl(<4 x i32>, ptr, i64)
62+
63+
define void @testSTXVRLL(<4 x i32> %a, ptr %b, i64 %c) {
64+
; CHECK-LABEL: testSTXVRLL:
65+
; CHECK: # %bb.0: # %entry
66+
; CHECK-NEXT: stxvrll v2, [[REG:r[0-9]+]], [[REG1:r[0-9]+]]
67+
; CHECK: blr
68+
entry:
69+
tail call void @llvm.ppc.vsx.stxvrll(<4 x i32> %a, ptr %b, i64 %c)
70+
ret void
71+
}
72+
declare void @llvm.ppc.vsx.stxvrll(<4 x i32>, ptr, i64)

0 commit comments

Comments
 (0)