[AArch64][GlobalISel] Fix incorrect handling of fp truncating stores.
authorAmara Emerson <amara@apple.com>
Tue, 24 Aug 2021 20:56:01 +0000 (13:56 -0700)
committerAmara Emerson <amara@apple.com>
Tue, 24 Aug 2021 23:07:00 +0000 (16:07 -0700)
commit04fb9b729a53a5f513328159590d86d28336a6da
tree2f0ab0ec40cc2ae06f5e6181c57b3bd378ee1083
parentf653beea88d2684cdc8117e662b321ba04666771
[AArch64][GlobalISel] Fix incorrect handling of fp truncating stores.

When the tablegen patterns fail to select a truncating scalar FPR store,
our manual selection code also failed to handle it silently, trying to
generate an invalid copy. Fix this by adding support in the manual code
to generate a proper subreg copy before selecting a non-truncating store.
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/select-store-truncating-float.mir [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/select-with-no-legality-check.mir