[llvm] [VectorCombine] Enable transform 'scalarizeLoadExtract' for non constant indexes (PR #65445)
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 02:52:41 PDT 2023
================
@@ -1196,9 +1200,14 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
// Replace extracts with narrow scalar loads.
for (User *U : LI->users()) {
auto *EI = cast<ExtractElementInst>(U);
- Builder.SetInsertPoint(EI);
-
Value *Idx = EI->getOperand(1);
+
+ // Insert 'freeze' for poison indexes.
+ DenseMap<ExtractElementInst *, ScalarizationResult>::iterator It;
----------------
benshi001 wrote:
Adapted to `auto It = NeedFreeze.find(EI)`. Thanks!
https://github.com/llvm/llvm-project/pull/65445
More information about the llvm-commits
mailing list