[PATCH] D109103: [ISEL][BitTestBlock] omit additional bit test when default destination is unreachable
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 8 10:26:40 PDT 2021
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:3022
MachineBasicBlock *NextMBB;
- if (BTB.ContiguousRange && j + 2 == ej) {
+ if ((BTB.ContiguousRange || BTB.OmitRangeCheck) && j + 2 == ej) {
// Second-to-last bit-test with contiguous range: fall through to the
----------------
hans wrote:
> I think UnreachableDefault (or UnreachableFallthrough) would be a better name now, since it doesn't just omit the range check, it also omits the last bit test.
>
> Also some day we should unify all the switch lowering implementations in LLVM, I think there are four or so now :-)
Should this be renamed for BitTestBlock //AND JumpTableHeader//?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109103/new/
https://reviews.llvm.org/D109103
More information about the llvm-commits
mailing list