[AMDGPU] Add use check in v_fma combine.
authorThomas Symalla <thomas.symalla@amd.com>
Thu, 29 Sep 2022 07:29:39 +0000 (09:29 +0200)
committerThomas Symalla <thomas.symalla@amd.com>
Thu, 29 Sep 2022 10:25:03 +0000 (12:25 +0200)
commita41dde2c625ea7c9c71c79e5bbe8993023f20fd5
tree09f63fb28fef14677f0f95f3d439670f6fdd69e1
parent080a1e2bbbd1238e934a2aef7cd47f478bf3c917
[AMDGPU] Add use check in v_fma combine.

In D132837, an existing v_fma combine was extended to regard nested
fma instructions. Originally, the inner FMA was checked for being used
only once. In its current state, this check is missing, which causes
some regressions.

In this patch, this check was added.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D134856
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll