[PATCH] D140747: [Transform] Rewrite LowerSwitch using APInt
Peter Rong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 11:40:18 PST 2023
Peter marked an inline comment as done.
Peter added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LowerSwitch.cpp:461
- APInt N = High - Low + 1;
- assert(N.sge(SignedZero) && "Popularity shouldn't be negative.");
// Explict insert to make sure the bitwidth of APInts match
----------------
arsenm wrote:
> I don't understand why this wouldn't just be unsigned to begin with
Old version used `int64_t N`, which would have the same problem.
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