Peter Rong 67aec0cd62
[LowerSwitch] Use unsigned integer for range comparison (#93237)
Commit 1db51d8eb2 switched from int64_t to `APInt` to prevent high precision integer overflow.
However, when comparing the "range" of switch cases, we should switch to unsigned integer to prevent overflow.
This patch fixes https://github.com/llvm/llvm-project/issues/93152. 
Some test cases are added.

Signed-off-by: Peter Rong <PeterRong96@gmail.com>
2024-05-27 10:58:22 -07:00
..