[llvm] [RISCV] Restrict combineOp_VLToVWOp_VL w/ bf16 to vfwmadd_vl with zvfbfwma (PR #108798)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 10:20:39 PDT 2024
lukel97 wrote:
> Do we need to do this check when we check the other users too?
>
> ```
> auto AppendUsersIfNeeded = [&Worklist, &Subtarget,
> &Inserted](const NodeExtensionHelper &Op) {
> if (Op.needToPromoteOtherUsers()) {
> for (SDNode::use_iterator UI = Op.OrigOperand->use_begin(),
> UE = Op.OrigOperand->use_end();
> UI != UE; ++UI) {
> SDNode *TheUse = *UI;
> if (!NodeExtensionHelper::isSupportedRoot(TheUse, Subtarget))
> return false;
> // We only support the first 2 operands of FMA.
> if (UI.getOperandNo() >= 2)
> return false;
> if (Inserted.insert(TheUse).second)
> Worklist.push_back(TheUse);
> }
> }
> return true;
> };
> ```
If I'm reading this right, won't the other users of the extended bf16 ops go back onto the worklist, where they'll then have their LHS/RHS checked through the same NodeExtensionHelper constructor?
https://github.com/llvm/llvm-project/pull/108798
More information about the llvm-commits
mailing list