[llvm] [SimplifyCFG] Fold the contiguous wrapping cases into ICmp. (PR #161000)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 06:35:05 PDT 2025
================
@@ -5718,15 +5718,49 @@ bool SimplifyCFGOpt::simplifyUnreachable(UnreachableInst *UI) {
return Changed;
}
-static bool casesAreContiguous(SmallVectorImpl<ConstantInt *> &Cases) {
+static bool casesAreContiguous(Value *Condition,
+ SmallVectorImpl<ConstantInt *> &Cases,
----------------
antoniofrighetto wrote:
I think the function name would deserve an update, e.g., `findContiguousCases` (and maybe return a std::optional struct instead of the three values as out parameters)?
https://github.com/llvm/llvm-project/pull/161000
More information about the llvm-commits
mailing list