[llvm] [AMDGPU] siloadstoreopt generate REG_SEQUENCE with aligned operands (PR #162088)
Janek van Oirschot via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 07:38:40 PDT 2025
================
@@ -1363,6 +1363,15 @@ SILoadStoreOptimizer::checkAndPrepareMerge(CombineInfo &CI,
return Where;
}
+static bool isCompatibleAlignSubReg(const TargetRegisterClass *RC, unsigned Idx,
+ const GCNSubtarget *STM,
+ const SIRegisterInfo *TRI) {
+ if (!STM->needsAlignedVGPRs() || !TRI->isVGPRClass(RC) ||
+ !TRI->isProperlyAlignedRC(*RC) || AMDGPU::getRegBitWidth(*RC) == 32)
+ return true;
+ return !(TRI->getChannelFromSubReg(Idx) & 0x1);
----------------
JanekvO wrote:
Sorry, I'm not sure I'm following
I'm explicitly checking if the operands' alignment constraint is compatible with the destination register's alignment. Is there some way to check this?
https://github.com/llvm/llvm-project/pull/162088
More information about the llvm-commits
mailing list