[llvm] [NFC][PowerPC] Move Anonymous Patterns up for consistency (PR #160322)
Lei Huang via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 23 08:14:56 PDT 2025
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/160322
>From 487900faa8d7b5b82893e6f9b0fd48d9e48622c8 Mon Sep 17 00:00:00 2001
From: Lei Huang <lei at ca.ibm.com>
Date: Tue, 23 Sep 2025 15:18:57 +0000
Subject: [PATCH] [NFC][PowerPC] Move Anonymous Patterns section up to match
other td files
---
llvm/lib/Target/PowerPC/PPCInstrFuture.td | 33 +++++++++++------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/llvm/lib/Target/PowerPC/PPCInstrFuture.td b/llvm/lib/Target/PowerPC/PPCInstrFuture.td
index a61b347f912f0..46cd8cd0a83b3 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrFuture.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrFuture.td
@@ -278,6 +278,21 @@ let Predicates = [HasVSX, IsISAFuture] in {
//---------------------------- Anonymous Patterns ----------------------------//
// Predicate combinations available:
+// Load/Store VSX Vector with Right Length (Left-justified).
+def : Pat<(v4i32 (int_ppc_vsx_lxvrl addr:$RA, i64:$RB)), (LXVRL $RA, $RB)>;
+def : Pat<(v4i32 (int_ppc_vsx_lxvrll addr:$RA, i64:$RB)), (LXVRLL $RA, $RB)>;
+def : Pat<(int_ppc_vsx_stxvrl v4i32:$XT, addr:$RA, i64:$RB), (STXVRL $XT, $RA,
+ $RB)>;
+def : Pat<(int_ppc_vsx_stxvrll v4i32:$XT, addr:$RA, i64:$RB), (STXVRLL $XT, $RA,
+ $RB)>;
+
+// Load/Store VSX Vector pair with Right Length (Left-justified).
+def : Pat<(v256i1 (int_ppc_vsx_lxvprl addr:$RA, i64:$RB)), (LXVPRL $RA, $RB)>;
+def : Pat<(v256i1 (int_ppc_vsx_lxvprll addr:$RA, i64:$RB)), (LXVPRLL $RA, $RB)>;
+def : Pat<(int_ppc_vsx_stxvprl v256i1:$XTp, addr:$RA, i64:$RB), (STXVPRL $XTp,
+ $RA, $RB)>;
+def : Pat<(int_ppc_vsx_stxvprll v256i1:$XTp, addr:$RA, i64:$RB), (STXVPRLL $XTp,
+ $RA, $RB)>;
//---------------------------- Instruction aliases ---------------------------//
// Predicate combinations available:
@@ -307,21 +322,3 @@ let Predicates = [HasVSX, IsISAFuture] in {
def : InstAlias<"xxgfmul128xts $XT, $XA, $XB", (XXGFMUL128 vsrc:$XT, vsrc:$XA,
vsrc:$XB, 1)>;
}
-
-//---------------------------- Anonymous Patterns ----------------------------//
-
-// Load/Store VSX Vector with Right Length (Left-justified).
-def : Pat<(v4i32 (int_ppc_vsx_lxvrl addr:$RA, i64:$RB)), (LXVRL $RA, $RB)>;
-def : Pat<(v4i32 (int_ppc_vsx_lxvrll addr:$RA, i64:$RB)), (LXVRLL $RA, $RB)>;
-def : Pat<(int_ppc_vsx_stxvrl v4i32:$XT, addr:$RA, i64:$RB), (STXVRL $XT, $RA,
- $RB)>;
-def : Pat<(int_ppc_vsx_stxvrll v4i32:$XT, addr:$RA, i64:$RB), (STXVRLL $XT, $RA,
- $RB)>;
-
-// Load/Store VSX Vector pair with Right Length (Left-justified).
-def : Pat<(v256i1 (int_ppc_vsx_lxvprl addr:$RA, i64:$RB)), (LXVPRL $RA, $RB)>;
-def : Pat<(v256i1 (int_ppc_vsx_lxvprll addr:$RA, i64:$RB)), (LXVPRLL $RA, $RB)>;
-def : Pat<(int_ppc_vsx_stxvprl v256i1:$XTp, addr:$RA, i64:$RB), (STXVPRL $XTp,
- $RA, $RB)>;
-def : Pat<(int_ppc_vsx_stxvprll v256i1:$XTp, addr:$RA, i64:$RB), (STXVPRLL $XTp,
- $RA, $RB)>;
More information about the llvm-commits
mailing list