visitSwitchInst should not take INT_MAX when Cost is negative. Instead of INT_MAX , we also use a valid upperbound cost when overflow occurs in Cost.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks for the fix. Much appreciated.
I was hoping to take another look at getting you a better test case, but it looks like you came up with something good.
This fixes the differences we were seeing, so LGTM. Cheers.