Treat case value as unsigned when we find the min case in the switch is min signed value and max case is max signed value.
And if the unsigned table need to check range, we still use the signed table.
Fix: #56538
Details
Details
- Reviewers
- nikic - craig.topper - spatel 
Diff Detail
Diff Detail
Event Timeline
| llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
|---|---|---|
| 6373 | Why not use isMaxSignedValue to be consistent with the use of isMinSignedValue? | |
| llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
|---|---|---|
| 6373 | There is no isMaxSignedValue in Constant class.  | |
| llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
|---|---|---|
| 6373 | Then maybe use isMinValue here? Looks like isMinSignedValue() goes down to Constant which has to dyn_cast back to ConstantInt to call isMinValue. | |
Why not use isMaxSignedValue to be consistent with the use of isMinSignedValue?