[GlobalISel][IRTranslator] Fix crash during bit-test switch optimization with odd...
authorAmara Emerson <amara@apple.com>
Fri, 24 Sep 2021 06:49:39 +0000 (23:49 -0700)
committerAmara Emerson <amara@apple.com>
Fri, 24 Sep 2021 07:19:27 +0000 (00:19 -0700)
commit9f773b17c2bc6916f12048a52ae271d1bf0edacf
treec02df71b12614510018d7f93c78f19e73da21e1f
parent9e8fff26f374766b76aad9531ee5e6860f67e46c
[GlobalISel][IRTranslator] Fix crash during bit-test switch optimization with odd types.

Odd switch case types cause a crash in the conversion to MVT. Instead use a pointer sized
scalar type which is what SDAG does in these cases.
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-switch-bittest.ll