[llvm] [AMDGPU] LiveRegOptimizer: fix PHI same-BB filter; consider i8/i16 binops on SDWA (PR #155800)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 07:55:25 PDT 2025
================
@@ -126,7 +126,37 @@ class LiveRegOptimizer {
return LK.first != TargetLoweringBase::TypeLegal;
}
- bool isOpLegal(Instruction *I) { return isa<StoreInst, IntrinsicInst>(I); }
+ bool isOpLegal(Instruction *I) {
+ if (auto *Intr = dyn_cast<IntrinsicInst>(I))
+ return true; // FIXME: narrow to known native intrinsics (DOT/MFMA/tbuffer) or use TTI cost.
----------------
michaelselehov wrote:
Thanks. I'll look what TTI can provide. If TTI already provides a reliable signal for these cases, I’ll switch the gate to be TTI-only. If it doesn’t, I'm not sure if the change to TTI should be a part of this PR.
https://github.com/llvm/llvm-project/pull/155800
More information about the llvm-commits
mailing list