[llvm] [AMDGPU][True16] Legalize S16 for stores & loads in GlobalISel when True16 is enabled (PR #176963)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 02:51:00 PDT 2026
================
@@ -464,8 +464,8 @@ static bool isLoadStoreSizeLegal(const GCNSubtarget &ST,
MemSize = std::max(MemSize, Align);
#endif
- // Only 1-byte and 2-byte to 32-bit extloads are valid.
- if (MemSize != RegSize && RegSize != 32)
+ // Only allow extloads to up to 32 bits.
+ if (MemSize != RegSize && RegSize > 32)
----------------
petar-avramovic wrote:
some s16 G_LOADs are actually already legal, iirc this came up from adding s16 to isRegisterType for true16
I was checking it again, and seems like there are some overlaps between
legalForTypesWithMemDesc and legalIf with your changes to AMDGPULegalizerInfo.cpp.
Could you try rewriting this a bit and split legalizerinfo changes one by one in another PR if necessary.
https://github.com/llvm/llvm-project/pull/176963
More information about the llvm-commits
mailing list