[llvm] [SLP]Keep externally used GEPs as GEPs, if possible instead of extractelement. (PR #88877)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 04:54:24 PDT 2024


================
@@ -10033,12 +10040,40 @@ InstructionCost BoUpSLP::getTreeCost(ArrayRef<Value *> VectorizedVals) {
         }
       }
     }
+    // Leave the GEPs as is, they are free in most cases and better to keep them
+    // as GEPs.
+    TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
----------------
RKSimon wrote:

why did you need to move this?

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


More information about the llvm-commits mailing list