[llvm] [PowerPC] Implement 32byte indexed paired ld and st instruction (PR #160767)
Lei Huang via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 30 11:07:13 PDT 2025
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/160767
>From 6fd7402bacbdb90d35ef7a8be67da27941aad958 Mon Sep 17 00:00:00 2001
From: Lei Huang <lei at ca.ibm.com>
Date: Thu, 25 Sep 2025 20:04:04 +0000
Subject: [PATCH] [PowerPC] Implement 32byte indexed paired ld and st
instruction
---
llvm/lib/Target/PowerPC/PPCInstrFuture.td | 8 ++++++++
.../MC/Disassembler/PowerPC/ppc-encoding-ISAFuture.txt | 6 ++++++
.../Disassembler/PowerPC/ppc64le-encoding-ISAFuture.txt | 6 ++++++
llvm/test/MC/PowerPC/ppc-encoding-ISAFuture.s | 8 ++++++++
4 files changed, 28 insertions(+)
diff --git a/llvm/lib/Target/PowerPC/PPCInstrFuture.td b/llvm/lib/Target/PowerPC/PPCInstrFuture.td
index 1aefea1a1c498..7acbc1e8e4535 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrFuture.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrFuture.td
@@ -310,6 +310,10 @@ let Predicates = [HasVSX, IsISAFuture] in {
def LXVPRLL : XForm_XTp5_RAB5<31, 621, (outs vsrprc:$XTp),
(ins (memr $RA):$addr, g8rc:$RB),
"lxvprll $XTp, $addr, $RB", IIC_LdStLFD, []>;
+ def LXVPB32X
+ : XForm_XTp5_RAB5<31, 877, (outs vsrprc:$XTp),
+ (ins (memr $RA):$addr, g8rc:$RB),
+ "lxvpb32x $XTp, $addr, $RB", IIC_LdStLFD, []>;
}
let mayStore = 1 in {
@@ -326,6 +330,10 @@ let Predicates = [HasVSX, IsISAFuture] in {
: XForm_XTp5_RAB5<31, 749, (outs),
(ins vsrprc:$XTp, (memr $RA):$addr, g8rc:$RB),
"stxvprll $XTp, $addr, $RB", IIC_LdStLFD, []>;
+ def STXVPB32X
+ : XForm_XTp5_RAB5<31, 1005, (outs),
+ (ins vsrprc:$XTp, (memr $RA):$addr, g8rc:$RB),
+ "stxvpb32x $XTp, $addr, $RB", IIC_LdStLFD, []>;
}
def VUPKHSNTOB : VXForm_VRTB5<387, 0, (outs vrrc:$VRT), (ins vrrc:$VRB),
diff --git a/llvm/test/MC/Disassembler/PowerPC/ppc-encoding-ISAFuture.txt b/llvm/test/MC/Disassembler/PowerPC/ppc-encoding-ISAFuture.txt
index cdfc8ce9e0ca5..02e91ec5a73e1 100644
--- a/llvm/test/MC/Disassembler/PowerPC/ppc-encoding-ISAFuture.txt
+++ b/llvm/test/MC/Disassembler/PowerPC/ppc-encoding-ISAFuture.txt
@@ -70,12 +70,18 @@
#CHECK: lxvprll 6, 2, 1
0x7c 0xc2 0x0c 0xda
+#CHECK: lxvpb32x 2, 15, 16
+0x7c,0x4f,0x86,0xda
+
#CHECK: stxvprl 0, 1, 2
0x7c 0x01 0x15 0x9a
#CHECK: stxvprll 6, 0, 1
0x7c 0xc0 0x0d 0xda
+#CHECK: stxvpb32x 2, 15, 16
+0x7c,0x4f,0x87,0xda
+
#CHECK: dmxvi8gerx4 1, 2, 4
0xec,0x82,0x20,0x58
diff --git a/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding-ISAFuture.txt b/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding-ISAFuture.txt
index f7e314fc819e4..d17c7e0e81a6b 100644
--- a/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding-ISAFuture.txt
+++ b/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding-ISAFuture.txt
@@ -64,12 +64,18 @@
#CHECK: lxvprll 6, 2, 1
0xda 0x0c 0xc2 0x7c
+#CHECK: lxvpb32x 2, 15, 16
+0xda,0x86,0x4f,0x7c
+
#CHECK: stxvprl 0, 1, 2
0x9a 0x15 0x01 0x7c
#CHECK: stxvprll 6, 0, 1
0xda 0x0d 0xc0 0x7c
+#CHECK: stxvpb32x 2, 15, 16
+0xda,0x87,0x4f,0x7c
+
#CHECK: dmxvi8gerx4 1, 2, 4
0x58,0x20,0x82,0xec
diff --git a/llvm/test/MC/PowerPC/ppc-encoding-ISAFuture.s b/llvm/test/MC/PowerPC/ppc-encoding-ISAFuture.s
index 29fedd7c20646..f453dd8c50cac 100644
--- a/llvm/test/MC/PowerPC/ppc-encoding-ISAFuture.s
+++ b/llvm/test/MC/PowerPC/ppc-encoding-ISAFuture.s
@@ -89,6 +89,10 @@
# CHECK-LE: lxvprll 6, 2, 1 # encoding: [0xda,0x0c,0xc2,0x7c]
lxvprll 6, 2, 1
+ lxvpb32x 2, 15, 16
+#CHECK-BE: lxvpb32x 2, 15, 16 # encoding: [0x7c,0x4f,0x86,0xda]
+#CHECK-LE: lxvpb32x 2, 15, 16 # encoding: [0xda,0x86,0x4f,0x7c]
+
# CHECK-BE: stxvprl 0, 1, 2 # encoding: [0x7c,0x01,0x15,0x9a]
# CHECK-LE: stxvprl 0, 1, 2 # encoding: [0x9a,0x15,0x01,0x7c]
stxvprl 0, 1, 2
@@ -97,6 +101,10 @@
# CHECK-LE: stxvprll 6, 0, 1 # encoding: [0xda,0x0d,0xc0,0x7c]
stxvprll 6, 0, 1
+ stxvpb32x 2, 15, 16
+#CHECK-BE: stxvpb32x 2, 15, 16 # encoding: [0x7c,0x4f,0x87,0xda]
+#CHECK-LE: stxvpb32x 2, 15, 16 # encoding: [0xda,0x87,0x4f,0x7c]
+
dmxvi8gerx4 1, 2, 4
# CHECK-BE: dmxvi8gerx4 1, 2, 4 # encoding: [0xec,0x82,0x20,0x58]
# CHECK-LE: dmxvi8gerx4 1, 2, 4 # encoding: [0x58,0x20,0x82,0xec]
More information about the llvm-commits
mailing list