[AArch64][GlobalISel] Handle any-extending FPR loads in manual selection code.
authorAmara Emerson <amara@apple.com>
Wed, 1 Sep 2021 00:22:39 +0000 (17:22 -0700)
committerAmara Emerson <amara@apple.com>
Wed, 1 Sep 2021 17:19:22 +0000 (10:19 -0700)
commita86bbe1e3191800d42abf073a060eb8601b8be37
tree2e3edd782c54085c1f8ee735325c7b76117734cc
parentf596acc74d4bccd034955042e385a2d5e2ba4f05
[AArch64][GlobalISel] Handle any-extending FPR loads in manual selection code.

When we have an any-extending FPR bank load, none of the tablegen patterns
match and we fall back to the C++ selector. Like with the truncating stores
that were fixed recently, the C++ wasn't able to handle it and ended up
generating invalid copies between different size regclasses.

This change adds handling for this case, splitting the load into a regular
load and a SUBREG_TO_REG to extend it into the original wide destination reg.
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/select-load.mir