[PATCH] D137449: [RISCV] Improve support for ADD_UW/SHXADD_UW in isAllUsesReadW.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 11:33:12 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbc6df5737fda: [RISCV] Improve support for ADD_UW/SHXADD_UW in hasAllWUsers. (authored by craig.topper).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137449

Files:
  llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp


Index: llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
+++ llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
@@ -138,6 +138,16 @@
         Worklist.push_back(UserMI);
         break;
 
+      case RISCV::ADD_UW:
+      case RISCV::SH1ADD_UW:
+      case RISCV::SH2ADD_UW:
+      case RISCV::SH3ADD_UW:
+        // Operand 1 is implicitly zero extended.
+        if (OpIdx == 1)
+          break;
+        Worklist.push_back(UserMI);
+        break;
+
       case RISCV::BEXTI:
         if (UserMI->getOperand(2).getImm() >= 32)
           return false;
@@ -166,17 +176,13 @@
       case RISCV::XOR:
       case RISCV::XORI:
 
-      case RISCV::ADD_UW:
       case RISCV::ANDN:
       case RISCV::CLMUL:
       case RISCV::ORC_B:
       case RISCV::ORN:
       case RISCV::SH1ADD:
-      case RISCV::SH1ADD_UW:
       case RISCV::SH2ADD:
-      case RISCV::SH2ADD_UW:
       case RISCV::SH3ADD:
-      case RISCV::SH3ADD_UW:
       case RISCV::XNOR:
         Worklist.push_back(UserMI);
         break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137449.474315.patch
Type: text/x-patch
Size: 1109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221109/1117fc07/attachment.bin>


More information about the llvm-commits mailing list