]> granicus.if.org Git - llvm/commit
Reapply r373431 "Switch lowering: omit range check for bit tests when default is...
authorHans Wennborg <hans@hanshq.net>
Wed, 2 Oct 2019 14:35:06 +0000 (14:35 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 2 Oct 2019 14:35:06 +0000 (14:35 +0000)
commit9a5d29b0bff0a4743cbf07c930a5e5b28111b55c
tree24a58200bfb6fe5a748d94642aab7cb19461b1d7
parent9077974bb9fbafcc561bb101f53fce734957eb16
Reapply r373431 "Switch lowering: omit range check for bit tests when default is unreachable (PR43129)"

This was reverted in r373454 due to breaking the expensive-checks bot.
This version addresses that by omitting the addSuccessorWithProb() call
when omitting the range check.

> Switch lowering: omit range check for bit tests when default is unreachable (PR43129)
>
> This is modeled after the same functionality for jump tables, which was
> added in r357067.
>
> Differential revision: https://reviews.llvm.org/D68131

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373477 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SwitchLoweringUtils.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/switch-bt.ll