[PATCH] D152260: [DAGCombiner] Use generalized pattern matcher in visitFMA to support vp.fma.
Yeting Kuo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 16:51:48 PDT 2023
fakepaper56 added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6819
// fneg is removable even if it has multiple uses.
- if (Op.getOpcode() == ISD::FNEG) {
+ if (Op.getOpcode() == ISD::FNEG || Op.getOpcode() == ISD::VP_FNEG) {
Cost = NegatibleCost::Cheaper;
----------------
luke wrote:
> Is the negation of VP_FNEG still operand 0 if the mask isn't all ones or the EVL is less than the vector width?
The behavior for inactive elements is undefined, so I think we don't need to care them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152260/new/
https://reviews.llvm.org/D152260
More information about the llvm-commits
mailing list