[DAGCombiner] Use generalized pattern match for visitFSUBForFMACombine.
authorYeting Kuo <yeting.kuo@sifive.com>
Thu, 4 May 2023 06:59:03 +0000 (14:59 +0800)
committerYeting Kuo <yeting.kuo@sifive.com>
Thu, 4 May 2023 14:02:32 +0000 (22:02 +0800)
commit287aa6c4536408413b860e61fca0318a27214cf3
treeb4dbf6eec4ebdd6380ad14f1ee4a0f7d9d9d5b30
parent398403259a5a42624d382517f05b21f106f591b8
[DAGCombiner] Use generalized pattern match for visitFSUBForFMACombine.

The patch makes visitFSUBForFMACombine serve vp.fsub too. It helps DAGCombiner
to fuse vp.fsub and vp.fmul patterns to vp.fma.

Reviewed By: luke

Differential Revision: https://reviews.llvm.org/D149821
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/RISCV/rvv/fold-vp-fsub-and-vp-fmul.ll [new file with mode: 0644]