[PATCH] D153351: [RISCV] Fold vmv.v.v into vops
    Philip Reames via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jul  6 11:07:51 PDT 2023
    
    
  
reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.
The example code from the description is wrong.  The "ta" needs to be "tu" to be correct.
  vsetivli zero, 2, e32, m1, ta, ma
  vadd.vv v8, v10, v11
Glancing at a few of the test, this appears wrong in the implementation as well.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:3517
+
+    // Make sure there's a corresponding MaskedPseudo otherwise it's not safe to
+    // change VL.
----------------
Please rebase this over D154620, and then use the exact same code structure as the vmerge transform.  Having them different makes it very hard to follow.  
Hm, this is just a thought.  But could we take the existing vmerge transform, and split it into two steps?  If a vmv.v.v is like a vmerge with a all ones mask, could the vmerge transform become "first form vmv.v.v" and "then fold vmv.v.v into true"?  We in fact already have both of these pieces, can we simply reorder and restructure?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153351/new/
https://reviews.llvm.org/D153351
    
    
More information about the llvm-commits
mailing list