[llvm] ce616aa - [RISCV][NFC] Simplify PatFrag mul_const_oneuse
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 21:58:59 PDT 2023
Author: Ben Shi
Date: 2023-04-01T12:58:44+08:00
New Revision: ce616aa014e1bf2710ae3afb2e4cd814cdadb402
URL: https://github.com/llvm/llvm-project/commit/ce616aa014e1bf2710ae3afb2e4cd814cdadb402
DIFF: https://github.com/llvm/llvm-project/commit/ce616aa014e1bf2710ae3afb2e4cd814cdadb402.diff
LOG: [RISCV][NFC] Simplify PatFrag mul_const_oneuse
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D147309
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfo.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
index 888c9b3177801..a13f672972f50 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -1247,8 +1247,7 @@ def mul_oneuse : binop_oneuse<mul>;
def mul_const_oneuse : PatFrag<(ops node:$A, node:$B),
(mul node:$A, node:$B), [{
if (auto *N1C = dyn_cast<ConstantSDNode>(N->getOperand(1)))
- if (N1C->hasOneUse())
- return true;
+ return N1C->hasOneUse();
return false;
}]>;
More information about the llvm-commits
mailing list