[GlobalISel][IRTranslator] Fix some PHI bugs related to jump tables when optimization...
authorAmara Emerson <aemerson@apple.com>
Thu, 27 Jun 2019 23:56:34 +0000 (23:56 +0000)
committerAmara Emerson <aemerson@apple.com>
Thu, 27 Jun 2019 23:56:34 +0000 (23:56 +0000)
commitecb7ac35f9de3d4a89b382ae251337f0fe2941ef
treea915ec98bc68492b3eb1c4ef78985b242680b029
parent92e625c2233c98a9ffa6d7d5cc10462957425054
[GlobalISel][IRTranslator] Fix some PHI bugs related to jump tables when optimizations are used.

The new switch lowering code that tries to generate jump tables and range checks
were tested at -O0 on arm64, but on -O3 the generic switch lowering code goes to
town on trying to generate optimized lowerings, e.g. multiple jump tables, range
checks etc. This exposed bugs in the way PHI nodes are handled because the CFG
looks even stranger after all of this is done.

llvm-svn: 364613
llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-switch.ll