[X86][FP16] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)
authorLiu, Chen3 <chen3.liu@intel.com>
Fri, 17 Sep 2021 07:11:20 +0000 (15:11 +0800)
committerLiu, Chen3 <chen3.liu@intel.com>
Thu, 23 Sep 2021 07:37:08 +0000 (15:37 +0800)
commit76656ec8ec535bd17afc998112a83c7c55ad7719
tree5bb6ea5e818b1cd76f6456a0a9277e45f17a4d0c
parent352a2e67162541efe79a1e144b40a054751e7d5c
[X86][FP16] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)

This patch is to support transform something like
_mm512_add_ph(acc, _mm512_fmadd_pch(a, b, _mm512_setzero_ph()))
to _mm512_fmadd_pch(a, b, acc).

Differential Revision: https://reviews.llvm.org/D109953
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512fp16-combine-vfmac-fadd.ll [new file with mode: 0644]