[RISCV] Teach performCombineVMergeAndVOps to handle instructions FMA instructions.
authorCraig Topper <craig.topper@sifive.com>
Tue, 30 May 2023 02:44:43 +0000 (19:44 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 30 May 2023 02:44:43 +0000 (19:44 -0700)
commit9239d3a3eaf278ecf36376760b21e49512de6ac6
tree0caba8092334c85dc80218879c039bc2ccccc10d
parent071e9d7bac7a5c879b1c67e1c4e847814f6d8254
[RISCV] Teach performCombineVMergeAndVOps to handle instructions FMA instructions.

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.

Reviewed By: fakepaper56, frasercrmck

Differential Revision: https://reviews.llvm.org/D151596
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll
llvm/test/CodeGen/RISCV/rvv/vfwmsac-vp.ll