This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Teach performCombineVMergeAndVOps to handle instructions FMA instructions.
ClosedPublic

Authored by craig.topper on May 26 2023, 3:28 PM.

Details

Summary

Previously we only handled instructions with merge ops that were
also masked. This patch supports instructions with merge ops that
aren't masked, like FMA.

I'm only folding into a TU vmerge for now. Supporting TA vmerge
shouldn't be much more work, but we need to make sure we get the
policy operand for the result correct. And of course we need more
tests.

Diff Detail

Event Timeline

craig.topper created this revision.May 26 2023, 3:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 3:28 PM
craig.topper requested review of this revision.May 26 2023, 3:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 3:28 PM
This revision is now accepted and ready to land.May 27 2023, 11:31 PM
frasercrmck accepted this revision.May 29 2023, 1:50 AM

LGTM

llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
3303

Was this moved just to keep the "HasOp" checks together? I don't mind the change - just asking in case it was part of an earlier diff that got refactored.

llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll
57

Double underscore in function name?