[llvm] 7d91c4f - [ARM] Use tablegen HasOneUse. NFC
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 1 10:41:27 PDT 2025
Author: David Green
Date: 2025-04-01T18:41:21+01:00
New Revision: 7d91c4f3eb689c0dc5ae95acbf321fec7e96cca7
URL: https://github.com/llvm/llvm-project/commit/7d91c4f3eb689c0dc5ae95acbf321fec7e96cca7
DIFF: https://github.com/llvm/llvm-project/commit/7d91c4f3eb689c0dc5ae95acbf321fec7e96cca7.diff
LOG: [ARM] Use tablegen HasOneUse. NFC
Added:
Modified:
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td
index 2a3a4e91eee4c..d6387ff848593 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.td
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.td
@@ -465,19 +465,16 @@ class BinOpFrag<dag res> : PatFrag<(ops node:$LHS, node:$RHS), res>;
class UnOpFrag <dag res> : PatFrag<(ops node:$Src), res>;
// An 'and' node with a single use.
-def and_su : PatFrag<(ops node:$lhs, node:$rhs), (and node:$lhs, node:$rhs), [{
- return N->hasOneUse();
-}]>;
+let HasOneUse = 1 in
+def and_su : PatFrag<(ops node:$lhs, node:$rhs), (and node:$lhs, node:$rhs)>;
// An 'xor' node with a single use.
-def xor_su : PatFrag<(ops node:$lhs, node:$rhs), (xor node:$lhs, node:$rhs), [{
- return N->hasOneUse();
-}]>;
+let HasOneUse = 1 in
+def xor_su : PatFrag<(ops node:$lhs, node:$rhs), (xor node:$lhs, node:$rhs)>;
// An 'fmul' node with a single use.
-def fmul_su : PatFrag<(ops node:$lhs, node:$rhs), (fmul node:$lhs, node:$rhs),[{
- return N->hasOneUse();
-}]>;
+let HasOneUse = 1 in
+def fmul_su : PatFrag<(ops node:$lhs, node:$rhs), (fmul node:$lhs, node:$rhs)>;
// An 'fadd' node which checks for single non-hazardous use.
def fadd_mlx : PatFrag<(ops node:$lhs, node:$rhs),(fadd node:$lhs, node:$rhs),[{
diff --git a/llvm/lib/Target/ARM/ARMInstrThumb2.td b/llvm/lib/Target/ARM/ARMInstrThumb2.td
index 033df9c2fd204..9f80af07df0fc 100644
--- a/llvm/lib/Target/ARM/ARMInstrThumb2.td
+++ b/llvm/lib/Target/ARM/ARMInstrThumb2.td
@@ -5735,11 +5735,10 @@ def t2CSINC : CS<"csinc", 0b1001>;
def t2CSINV : CS<"csinv", 0b1010>;
def t2CSNEG : CS<"csneg", 0b1011>;
+let HasOneUse = 1 in
def ARMcsinc_su
: PatFrag<(ops node:$lhs, node:$rhs, node:$cc, node:$flags),
- (ARMcsinc node:$lhs, node:$rhs, node:$cc, node:$flags), [{
- return N->hasOneUse();
-}]>;
+ (ARMcsinc node:$lhs, node:$rhs, node:$cc, node:$flags)>;
let Predicates = [HasV8_1MMainline] in {
multiclass CSPats<SDNode Node, Instruction Insn> {
More information about the llvm-commits
mailing list