OSDN Git Service

[DAGCombiner, PowerPC] allow X - (fpext(-Y) --> X + fpext(Y) with multiple uses
authorSanjay Patel <spatel@rotateright.com>
Sun, 15 Apr 2018 16:43:48 +0000 (16:43 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 15 Apr 2018 16:43:48 +0000 (16:43 +0000)
commit8a7e3a43d6217a3e5803c2af6776af6ba671aa03
tree8a08c2008ded84cf1e2d904e05a53a7819cc8790
parent42ded2d64e0f77d9f07e3799ddc8a52646349894
[DAGCombiner, PowerPC] allow X - (fpext(-Y) --> X + fpext(Y) with multiple uses

This is a transform that I limited in instcombine in rL329821 because it was
creating more instructions in IR when the cast has multiple uses.

But if the cast is free, then we can do the transform regardless of other
uses because it improves the potential throughput of the calculation by
removing a dependency on the fneg.

Differential Revision: https://reviews.llvm.org/D45598

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330098 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/PowerPC/fsub-fneg.ll