[llvm] d8bf039 - [AArch64] Use tablegen HasOneUse. NFC
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 1 10:41:25 PDT 2025
Author: David Green
Date: 2025-04-01T18:37:10+01:00
New Revision: d8bf0398e5d5a9b9f7f186c0535a069055a03150
URL: https://github.com/llvm/llvm-project/commit/d8bf0398e5d5a9b9f7f186c0535a069055a03150
DIFF: https://github.com/llvm/llvm-project/commit/d8bf0398e5d5a9b9f7f186c0535a069055a03150.diff
LOG: [AArch64] Use tablegen HasOneUse. NFC
Added:
Modified:
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
index 3ee71c14c6bd4..a2f326c994c2f 100644
--- a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+++ b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
@@ -392,15 +392,13 @@ def AArch64splice : SDNode<"AArch64ISD::SPLICE", SDT_AArch64Arith>;
def reinterpret_cast : SDNode<"AArch64ISD::REINTERPRET_CAST", SDTUnaryOp>;
+let HasOneUse = 1 in
def AArch64mul_p_oneuse : PatFrag<(ops node:$pred, node:$src1, node:$src2),
- (AArch64mul_p node:$pred, node:$src1, node:$src2), [{
- return N->hasOneUse();
-}]>;
+ (AArch64mul_p node:$pred, node:$src1, node:$src2)>;
+let HasOneUse = 1 in
def AArch64fmul_p_oneuse : PatFrag<(ops node:$pred, node:$src1, node:$src2),
- (AArch64fmul_p node:$pred, node:$src1, node:$src2), [{
- return N->hasOneUse();
-}]>;
+ (AArch64fmul_p node:$pred, node:$src1, node:$src2)>;
def AArch64fabd_p : PatFrags<(ops node:$pg, node:$op1, node:$op2),
diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td
index eafaf1717902e..772c440685072 100644
--- a/llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -119,10 +119,9 @@ def SDT_AArch64Setcc : SDTypeProfile<1, 4, [
]>;
def AArch64setcc_z : SDNode<"AArch64ISD::SETCC_MERGE_ZERO", SDT_AArch64Setcc>;
+let HasOneUse = 1 in
def AArch64setcc_z_oneuse : PatFrag<(ops node:$pg, node:$op1, node:$op2, node:$cc),
- (AArch64setcc_z node:$pg, node:$op1, node:$op2, node:$cc), [{
- return N->hasOneUse();
-}]>;
+ (AArch64setcc_z node:$pg, node:$op1, node:$op2, node:$cc)>;
def SVEPatternOperand : AsmOperandClass {
let Name = "SVEPattern";
@@ -409,15 +408,12 @@ def sve_ext_imm_0_63 : ComplexPattern<i64, 1, "SelectEXTImm<63, 4>">;
def sve_ext_imm_0_127 : ComplexPattern<i64, 1, "SelectEXTImm<127, 2>">;
def sve_ext_imm_0_255 : ComplexPattern<i64, 1, "SelectEXTImm<255, 1>">;
+let HasOneUse = 1 in
def int_aarch64_sve_cntp_oneuse : PatFrag<(ops node:$pred, node:$src2),
- (int_aarch64_sve_cntp node:$pred, node:$src2), [{
- return N->hasOneUse();
-}]>;
-
+ (int_aarch64_sve_cntp node:$pred, node:$src2)>;
+let HasOneUse = 1 in
def step_vector_oneuse : PatFrag<(ops node:$idx),
- (step_vector node:$idx), [{
- return N->hasOneUse();
-}]>;
+ (step_vector node:$idx)>;
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list