[PATCH] D147309: [RISCV][NFC] Simplify PatFrag mul_const_oneuse

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 21:59:04 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGce616aa014e1: [RISCV][NFC] Simplify PatFrag mul_const_oneuse (authored by benshi001).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147309/new/

https://reviews.llvm.org/D147309

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfo.td


Index: llvm/lib/Target/RISCV/RISCVInstrInfo.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -1247,8 +1247,7 @@
 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;
 }]>;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147309.510176.patch
Type: text/x-patch
Size: 505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230401/6d8a1a91/attachment.bin>


More information about the llvm-commits mailing list