[llvm] [VectorCombine] Enable transform 'scalarizeLoadExtract' for non constant indexes (PR #65445)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 22:34:37 PDT 2023
================
@@ -1173,10 +1176,11 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
}
auto ScalarIdx = canScalarizeAccess(VecTy, UI->getOperand(1), &I, AC, DT);
- if (!ScalarIdx.isSafe()) {
- // TODO: Freeze index if it is safe to do so.
- ScalarIdx.discard();
+ if (ScalarIdx.isUnsafe()) {
return false;
+ } else if (ScalarIdx.isSafeWithFreeze()) {
----------------
nikic wrote:
No else after return.
https://github.com/llvm/llvm-project/pull/65445
More information about the llvm-commits
mailing list