[PATCH] D26602: [DAGCombiner] do not fold (fmul (fadd X, 1), Y) -> (fmad X, Y, Y) by default

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 03:34:28 PST 2016


nhaehnle created this revision.
nhaehnle added reviewers: RKSimon, spatel, arsenm, tstellarAMD.
nhaehnle added a subscriber: llvm-commits.
Herald added a subscriber: wdng.

When X = 0 and Y = inf, the original code produces inf, but the transformed
code produces nan. So this transform (and its relatives) should only be
used when the no-infs-fp-math flag is explicitly enabled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98578


https://reviews.llvm.org/D26602

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AMDGPU/fma-combine.ll
  test/CodeGen/X86/fma_patterns.ll
  test/CodeGen/X86/fma_patterns_wide.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26602.77787.patch
Type: text/x-patch
Size: 52086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161114/baff70cc/attachment.bin>


More information about the llvm-commits mailing list