[llvm] [VectorCombine] Add a cost model for shuffleToIdentity. (PR #93937)
    David Green via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jun  3 07:15:18 PDT 2024
    
    
  
================
@@ -1670,8 +1670,12 @@ bool VectorCombine::foldShuffleOfShuffles(Instruction &I) {
 
 using InstLane = std::pair<Value *, int>;
 
-static InstLane lookThroughShuffles(Value *V, int Lane) {
+static InstLane
+lookThroughShuffles(Value *V, int Lane,
+                    SmallPtrSetImpl<Instruction *> *VisitedShuffles) {
----------------
davemgreen wrote:
I think you mean generateInstLaneVectorFromOperand? This one is only called with non-null. There is only one call to generateInstLaneVectorFromOperand with nullptr, so I opted to keep it explicit. It does not feel like there is a lot to gain from adding the default.
https://github.com/llvm/llvm-project/pull/93937
    
    
More information about the llvm-commits
mailing list