llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) <details> <summary>Changes</summary> This was pre-filtering out a specific situation from being added to the fold candidate list. The operand legality will ultimately be checked with isOperandLegal before the fold is performed, so I don't see the plus in pre-filtering this one case. --- Full diff: https://github.com/llvm/llvm-project/pull/140587.diff 1 Files Affected: - (modified) llvm/lib/Target/AMDGPU/SIFoldOperands.cpp (-18) ``````````diff diff --git a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp index d94c2d8b03dff..3abc1be685e2e 100644 --- a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp +++ b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp @@ -778,24 +778,6 @@ bool SIFoldOperandsImpl::tryAddToFoldList( return true; } - // Check the case where we might introduce a second constant operand to a - // scalar instruction - if (TII->isSALU(MI->getOpcode())) { - const MCInstrDesc &InstDesc = MI->getDesc(); - const MCOperandInfo &OpInfo = InstDesc.operands()[OpNo]; - - // Fine if the operand can be encoded as an inline constant - if (!OpToFold->isReg() && !TII->isInlineConstant(*OpToFold, OpInfo)) { - // Otherwise check for another constant - for (unsigned i = 0, e = InstDesc.getNumOperands(); i != e; ++i) { - auto &Op = MI->getOperand(i); - if (OpNo != i && !Op.isReg() && - !TII->isInlineConstant(Op, InstDesc.operands()[i])) - return false; - } - } - } - appendFoldCandidate(FoldList, MI, OpNo, OpToFold); return true; } `````````` </details> https://github.com/llvm/llvm-project/pull/140587 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits