[PATCH] D66666: [AMDGPU] Remove unnecessary movs for v_fmac operands
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 12:11:49 PDT 2019
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:2630-2633
+ if (!Src0Mods && !Src1Mods && !Clamp && !Omod &&
+ (ST.getConstantBusLimit(Opc) > 1 ||
+ !Src0->isReg() ||
+ !RI.isSGPRReg(MBB->getParent()->getRegInfo(), Src0->getReg()))) {
----------------
rtaylor wrote:
> arsenm wrote:
> > These are the exact conditions as checked above
> Yes, it is. I could create a local function that does this and replace both with that, it would be just as ugly since there are so many conditions (params) to pass, or I could pass MI and re-get all those operands, which would be the exact code that is already in the function.
Why can't you just set a bool flag inside the first condition?
Anyway, I would prefer if the wasn't done here at all, and SIFoldOperands took care of this
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66666/new/
https://reviews.llvm.org/D66666
More information about the llvm-commits
mailing list