[llvm] [RISCV] Move performCombineVMergeAndVOps into RISCVFoldMasks (PR #71764)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 20:07:35 PST 2023
================
@@ -9,15 +9,29 @@
// This pass performs various peephole optimisations that fold masks into vector
// pseudo instructions after instruction selection.
//
-// Currently it converts
-// PseudoVMERGE_VVM %false, %false, %true, %allonesmask, %vl, %sew
+// It performs the following transforms:
+//
+// %true = PseudoFOO %passthru, ..., %vl, %sew
+// %x = PseudoVMERGE_VVM %passthru, %passthru, %true, %mask, %vl, %sew
+// ->
+// %x = PseudoFOO_MASK %false, ..., %mask, %vl, %sew
+//
+// %x = PseudoFOO_MASK ..., %allonesmask, %vl, %sew
// ->
-// PseudoVMV_V_V %false, %true, %vl, %sew
+// %x = PseudoFOO ..., %vl, %sew
+//
+// %x = PseudoVMERGE_VVM %false, %false, %true, %allonesmask, %vl, %sew
+// ->
+// %x = PseudoVMV_V_V %false, %true, %vl, %sew
//
//===---------------------------------------------------------------------===//
#include "RISCV.h"
+#include "RISCVISelDAGToDAG.h"
----------------
wangpc-pp wrote:
Why do we need to include `RISCVISelDAGToDAG.h`?
And some other includes can be removed.
https://github.com/llvm/llvm-project/pull/71764
More information about the llvm-commits
mailing list