From 28bfd853abc340673ab298e1085037d6dbd28eb2 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 28 Oct 2022 11:48:33 +0100 Subject: [PATCH] [DAG] visitFSUBForFMACombine - pass callbacks by reference in isContractableAndReassociableFMUL lambda capture. NFC. Fixes a coverity remark about large copies by value --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 2e09f48..b4d2b21 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()); }; -- 2.7.4