Skip to content

Commit 819e8ee

Browse files
committed
add stxvprl[l]
1 parent b3ccc64 commit 819e8ee

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

llvm/lib/Target/PowerPC/PPCInstrFuture.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def : Pat<(int_ppc_vsx_stxvrl v4i32:$XT, addr:$RA, i64:$RB),
9494
(STXVRL $XT, $RA, $RB)>;
9595
def : Pat<(int_ppc_vsx_stxvrll v4i32:$XT, addr:$RA, i64:$RB),
9696
(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)>;
97+
def : Pat<(int_ppc_vsx_stxvprl v256i1:$XTp, addr:$RA, i64:$RB),
98+
(STXVPRL $XTp, $RA, $RB)>;
99+
def : Pat<(int_ppc_vsx_stxvprll v256i1:$XTp, addr:$RA, i64:$RB),
100+
(STXVPRLL $XTp, $RA, $RB)>;

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,31 @@ entry:
7070
ret void
7171
}
7272
declare void @llvm.ppc.vsx.stxvrll(<4 x i32>, ptr, i64)
73+
74+
define void @testSTXVPRL(ptr %v, ptr %vp, i64 %len) {
75+
; CHECK-LABEL: testSTXVPRL:
76+
; CHECK: # %bb.0: # %entry
77+
; CHECK-NEXT: lxv v2
78+
; CHECK-NEXT: lxv v3
79+
; CHECK-NEXT: stxvprl vsp34, r4, r5
80+
; CHECK-NEXT: blr
81+
entry:
82+
%0 = load <256 x i1>, ptr %v, align 32
83+
tail call void @llvm.ppc.vsx.stxvprl(<256 x i1> %0, ptr %vp, i64 %len)
84+
ret void
85+
}
86+
declare void @llvm.ppc.vsx.stxvprl(<256 x i1>, ptr, i64)
87+
88+
define void @testSTXVPRLL(ptr %v, ptr %vp, i64 %len) {
89+
; CHECK-LABEL: testSTXVPRLL:
90+
; CHECK: # %bb.0: # %entry
91+
; CHECK-NEXT: lxv v2
92+
; CHECK-NEXT: lxv v3
93+
; CHECK-NEXT: stxvprll vsp34, r4, r5
94+
; CHECK-NEXT: blr
95+
entry:
96+
%0 = load <256 x i1>, ptr %v, align 32
97+
tail call void @llvm.ppc.vsx.stxvprll(<256 x i1> %0, ptr %vp, i64 %len)
98+
ret void
99+
}
100+
declare void @llvm.ppc.vsx.stxvprll(<256 x i1>, ptr, i64)

0 commit comments

Comments
 (0)