[PATCH] D32596: [DAGCombine] Transform (fmul X, -2.0) --> (fneg (fadd X, X)).
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 15:20:36 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9583
+ // fold (fmul X, -2.0) -> (fneg (fadd X, X))
+ if (N1CFP && N1CFP->isExactlyValue(-2.0))
+ if (!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT)) {
----------------
Only do this if isFNegFree()?
https://reviews.llvm.org/D32596
More information about the llvm-commits
mailing list