[llvm-branch-commits] [llvm] [AMDGPU][InstCombine] Canonicalize dot constant operands (PR #225083)
Steffen Larsen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 22 00:21:30 PDT 2026
================
@@ -1974,6 +1974,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
case Intrinsic::amdgcn_udot4:
case Intrinsic::amdgcn_sdot8:
case Intrinsic::amdgcn_udot8: {
+ Value *Src0 = II.getArgOperand(0);
+ Value *Src1 = II.getArgOperand(1);
+
+ if (isa<Constant>(Src0) && !isa<Constant>(Src1)) {
----------------
steffenlarsen wrote:
I would prefer a small comment here stating that this is a canonicalization.
https://github.com/llvm/llvm-project/pull/225083
More information about the llvm-branch-commits
mailing list