[llvm] 5e8def2 - Revert "[RISCV] Remove dead early exit in performCombineVMergeAndVOps. NFC"

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 04:30:14 PST 2024


Author: Luke Lau
Date: 2024-01-17T19:29:22+07:00
New Revision: 5e8def2f14151655b0cfdb5d3ad591e3b4771e7d

URL: https://github.com/llvm/llvm-project/commit/5e8def2f14151655b0cfdb5d3ad591e3b4771e7d
DIFF: https://github.com/llvm/llvm-project/commit/5e8def2f14151655b0cfdb5d3ad591e3b4771e7d.diff

LOG: Revert "[RISCV] Remove dead early exit in performCombineVMergeAndVOps. NFC"

This reverts commit cee60a80101dbc2494865910fc7acef4fcab42bd.

This change is not NFC because there is also an additional check for
isImplicitDef in the branch above.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index df5766a294c982..0d8688ba2eaeaf 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -3545,6 +3545,9 @@ bool RISCVDAGToDAGISel::performCombineVMergeAndVOps(SDNode *N) {
 
   if (IsMasked) {
     assert(HasTiedDest && "Expected tied dest");
+    // The vmerge instruction must be TU.
+    if (isImplicitDef(Merge))
+      return false;
     // The vmerge instruction must have an all 1s mask since we're going to keep
     // the mask from the True instruction.
     // FIXME: Support mask agnostic True instruction which would have an


        


More information about the llvm-commits mailing list