[llvm] [SimplifyCFG] handle monotonic wrapped case for D150943 (PR #65882)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 01:01:20 PDT 2023
================
@@ -6082,15 +6083,19 @@ SwitchLookupTable::SwitchLookupTable(
LinearMappingPossible = false;
break;
}
- Wrapped |=
+ NonMonotonic |=
Dist.isStrictlyPositive() ? Val.sle(PrevVal) : Val.sgt(PrevVal);
}
PrevVal = Val;
}
if (LinearMappingPossible) {
LinearOffset = cast<ConstantInt>(TableContents[0]);
LinearMultiplier = ConstantInt::get(M.getContext(), DistToPrev);
- LinearMapValWrapped = Wrapped;
+ bool MayMWrap = false;
----------------
nikic wrote:
MayMWrap -> MayWrap or MayMulWrap
https://github.com/llvm/llvm-project/pull/65882
More information about the llvm-commits
mailing list