[llvm] [VectorCombine] Add a cost model for shuffleToIdentity. (PR #93937)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 03:16:32 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) {
----------------
artagnon wrote:

`*VisitedShuffles = nullptr` in signature, so you don't have to pass nullptr explicitly?

https://github.com/llvm/llvm-project/pull/93937


More information about the llvm-commits mailing list