[llvm] r235508 - Fixed logic to enable complex FMA formation.

Eric Christopher echristo at gmail.com
Wed Apr 22 07:20:59 PDT 2015


Test case? Also while it's fairly obvious what you did if you look at the
code a more verbose commit message is often helpful. Thanks!

-eric

On Wed, Apr 22, 2015, 7:13 AM Olivier Sallenave <ohsallen at us.ibm.com> wrote:

> Author: ohsallen
> Date: Wed Apr 22 09:07:26 2015
> New Revision: 235508
>
> URL: http://llvm.org/viewvc/llvm-project?rev=235508&view=rev
> Log:
> Fixed logic to enable complex FMA formation.
>
> Modified:
>     llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=235508&r1=235507&r2=235508&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Apr 22
> 09:07:26 2015
> @@ -7164,7 +7164,7 @@ SDValue DAGCombiner::visitFADDForFMAComb
>                                       N0));
>      }
>
> -    if (LookThroughFPExt) {
> +    if (UnsafeFPMath && LookThroughFPExt) {
>        // fold (fadd (fma x, y, (fpext (fmul u, v))), z)
>        //   -> (fma x, y, (fma (fpext u), (fpext v), z))
>        auto FoldFAddFMAFPExtFMul = [&] (
> @@ -7415,7 +7415,7 @@ SDValue DAGCombiner::visitFSUBForFMAComb
>                                       N21, N0));
>      }
>
> -    if (LookThroughFPExt) {
> +    if (UnsafeFPMath && LookThroughFPExt) {
>        // fold (fsub (fma x, y, (fpext (fmul u, v))), z)
>        //   -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))
>        if (N0.getOpcode() == PreferredFusedOpcode) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150422/25ef7488/attachment.html>


More information about the llvm-commits mailing list