HomePhabricator

[X86][FP16] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)

Authored by LiuChen3 on Sep 17 2021, 12:11 AM.

Description

[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