This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Use generalized pattern matcher in visitFMA to support vp.fma.
ClosedPublic

Authored by fakepaper56 on Jun 6 2023, 5:24 AM.

Details

Summary

Note: Some patterns in visitFMA are needed refined to support splat of constant.

Diff Detail

Event Timeline

fakepaper56 created this revision.Jun 6 2023, 5:24 AM
fakepaper56 requested review of this revision.Jun 6 2023, 5:24 AM

Refine commit.

luke added inline comments.Jun 6 2023, 6:30 AM
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
6819

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?

fakepaper56 added inline comments.Jun 6 2023, 4:51 PM
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
6819

The behavior for inactive elements is undefined, so I think we don't need to care them.

luke accepted this revision.Jun 7 2023, 1:43 AM

LGTM

This revision is now accepted and ready to land.Jun 7 2023, 1:43 AM
This revision was landed with ongoing or failed builds.Jun 7 2023, 6:40 PM
This revision was automatically updated to reflect the committed changes.