Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp =================================================================== --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -6217,6 +6217,9 @@ if (!DVI) continue; + if (DVI->isUndef()) + continue; + if (DVI->hasArgList()) continue;