[GlobalISel] Fix non-pow-2 legalization of s56 stores.
authorAmara Emerson <amara@apple.com>
Fri, 16 Jul 2021 19:56:11 +0000 (12:56 -0700)
committerAmara Emerson <amara@apple.com>
Fri, 16 Jul 2021 20:29:49 +0000 (13:29 -0700)
commit9637848f51af0e770c6d19b6aa020250bf1d0c0f
treee30e3f0c9bbb6cade4028863bf4ce6abd023c08a
parentfa3231eb1810500a4d34d9daa6403dae4f5921b8
[GlobalISel] Fix non-pow-2 legalization of s56 stores.

s56 stores are broken down into s32 + s24 stores. During this step
both of those new stores use an anyextended s64 value, resulting in
truncating stores. With s56, the s24 requires another lower step to
make it legal, and we were crashing because we didn't expect non-pow-2
stores to also be truncating as well.

Differential Revision: https://reviews.llvm.org/D106183
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-non-pow2-load-store.mir