[llvm] 28bfd85 - [DAG] visitFSUBForFMACombine - pass callbacks by reference in isContractableAndReassociableFMUL lambda capture. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 03:49:16 PDT 2022
Author: Simon Pilgrim
Date: 2022-10-28T11:48:45+01:00
New Revision: 28bfd853abc340673ab298e1085037d6dbd28eb2
URL: https://github.com/llvm/llvm-project/commit/28bfd853abc340673ab298e1085037d6dbd28eb2
DIFF: https://github.com/llvm/llvm-project/commit/28bfd853abc340673ab298e1085037d6dbd28eb2.diff
LOG: [DAG] visitFSUBForFMACombine - pass callbacks by reference in isContractableAndReassociableFMUL lambda capture. NFC.
Fixes a coverity remark about large copies by value
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2e09f48f52386..b4d2b21b66483 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14719,8 +14719,8 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
return Options.UnsafeFPMath || N->getFlags().hasAllowReassociation();
};
- auto isContractableAndReassociableFMUL = [isContractableFMUL,
- isReassociable](SDValue N) {
+ auto isContractableAndReassociableFMUL = [&isContractableFMUL,
+ &isReassociable](SDValue N) {
return isContractableFMUL(N) && isReassociable(N.getNode());
};
More information about the llvm-commits
mailing list