[llvm] [indvars] Support known positive extends in getExtendedOperandRecurrence (PR #70990)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 08:58:05 PDT 2023
================
@@ -1384,7 +1384,22 @@ WidenIV::getExtendedOperandRecurrence(WidenIV::NarrowIVDefUse DU) {
else if (ExtKind == ExtendKind::Zero && OBO->hasNoUnsignedWrap())
ExtendOperExpr = SE->getZeroExtendExpr(
SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType);
- else
+ else if (DU.NeverNegative) {
----------------
nikic wrote:
Okay, different approach: Don't set ExtendOperExpr in this code, and instead set it afterwards based on ExtKind?
https://github.com/llvm/llvm-project/pull/70990
More information about the llvm-commits
mailing list