[PATCH] D140747: [Transform] Rewrite LowerSwitch using APInt
Peter Rong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 10:41:45 PST 2023
Peter reopened this revision.
Peter added a comment.
This revision is now accepted and ready to land.
Not just `i1` but for any type. (Easiest to trigger on `i1` tho).
The root cause is `N = High - Low + 1` may overflow to a negative number. (Imagine `i32 N = i32::max - i32::min + 1` as signed.)
Promoting `N` and `Pop` to higher precision would help. I am working on it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140747/new/
https://reviews.llvm.org/D140747
More information about the llvm-commits
mailing list