[PATCH] D90304: [GlobalISel] Introduce optimal variant of regbankselect
Gabriel Hjort Ã…kerlund via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 05:55:45 PST 2020
ehjogab marked an inline comment as done.
ehjogab added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:1328
+ if (DestReg) {
+ const RegisterBank *RB = MRI->getRegBankOrNull(DestReg);
+ if (RB) {
----------------
gargaroff wrote:
> This line is causing an assertion with some of our tests .ll tests as it tries to access the regbank of a physical register.
>
> You can provoke the assertion in existing AArch64 tests by adding `RegBankSelect::Optimal` to the RegBankSelect constructor call in `AArch64TargetMachine.cpp`.
>
> One of the tests triggering this for example is `llvm/test/CodeGen/AArch64/GlobalISel/regbank-ceil.ll`.
Ah, apparently getRegBankOrNull() fails when the register is not a virtual register. This has been fixed in the update. Thanks for spotting this!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90304/new/
https://reviews.llvm.org/D90304
More information about the llvm-commits
mailing list