[GlobalISel] Implement bit-test switch table optimization.
authorAmara Emerson <amara@apple.com>
Tue, 4 Aug 2020 17:55:27 +0000 (10:55 -0700)
committerAmara Emerson <amara@apple.com>
Wed, 12 Aug 2020 18:31:39 +0000 (11:31 -0700)
commit2ff14957e88715dbe760cf94367bd99aff5867db
treeeede1a4a27ea46f0b09898ed04fe39daa351b672
parent39de63aef9535fece984c3abf161892d1d97b938
[GlobalISel] Implement bit-test switch table optimization.

This is mostly a straight port from SelectionDAG. We re-use the actual bit-test
analysis part from SwitchLoweringUtils, which was factored out earlier to
support jump-tables.

Differential Revision: https://reviews.llvm.org/D85233
llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-switch-bittest.ll [new file with mode: 0644]