From: Craig Topper Date: Fri, 29 Mar 2019 18:36:40 +0000 (+0000) Subject: [X86] Use cached OptForSize in X86ISelDAGToDAG.cpp instead of pulling it from the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d4a7a0228262041386a3571de34a39750580bd9;p=llvm [X86] Use cached OptForSize in X86ISelDAGToDAG.cpp instead of pulling it from the function attribute. NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357297 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 1832cd222dd..444df1ae520 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -2690,8 +2690,7 @@ bool X86DAGToDAGISel::foldLoadStoreIntoMemOperand(SDNode *Node) { case X86ISD::ADD: case X86ISD::SUB: // Try to match inc/dec. - if (!Subtarget->slowIncDec() || - CurDAG->getMachineFunction().getFunction().optForSize()) { + if (!Subtarget->slowIncDec() || OptForSize) { bool IsOne = isOneConstant(StoredVal.getOperand(1)); bool IsNegOne = isAllOnesConstant(StoredVal.getOperand(1)); // ADD/SUB with 1/-1 and carry flag isn't used can use inc/dec.