[PATCH] D152166: [InstCombine] Expand contractable fmuladd into fmul + fadd

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 07:58:25 PDT 2023


foad added a comment.

In D152166#4455742 <https://reviews.llvm.org/D152166#4455742>, @fhahn wrote:

> Is there a test that shows the actual benefit of this, e..g due to further combines? One potential issue is that (parts of) the cost model won't consider `fadd/fmul` pairs as single instruction, so. there may be negative fallout in things like SLPVectorizer.

I added `test/CodeGen/AMDGPU/fmuladd-to-fma.ll` which shows one case where we get better optimization. I didn't look into exactly why that happens in this case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152166/new/

https://reviews.llvm.org/D152166



More information about the llvm-commits mailing list