This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Verify G_BITCAST changes the type
ClosedPublic

Authored by arsenm on Jun 9 2020, 10:21 AM.

Details

Reviewers
paquette
aemerson
Summary

Updated the AArch64 tests the best I could with my vague, inferred
understanding of AArch64 register banks. As far as I can tell, there
is only one 32-bit/64-bit type which will use the gpr register bank,
so we have to use the fpr bank for the other operand.

Diff Detail

Event Timeline

arsenm created this revision.Jun 9 2020, 10:21 AM

There are a couple places in the AArch64 tests where there are vectors on GPR registers. AFAIK we always want vectors on FPRs.

@aemerson should this happen?

llvm/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
410

AFAIK we should only have vectors on FPRs, but maybe I'm wrong about that.

@aemerson ?

aemerson added inline comments.Jul 7 2020, 4:15 PM
llvm/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
410

We never enable the greedy RBS mode. I think this behavior is wrong for vectors.

arsenm marked an inline comment as done.Jul 7 2020, 4:56 PM
arsenm added inline comments.
llvm/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
410

For the purpose of the patch, there just needs to be something here to test a bitcast. If it happens to produce the wrong output, that's a separate issue

aemerson accepted this revision.Jul 8 2020, 11:01 AM
aemerson added inline comments.
llvm/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
410

Please add a comment in this test to explain that the greedy checks are correct.

This revision is now accepted and ready to land.Jul 8 2020, 11:01 AM