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-Tag: llvmorg-10-init~8861 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ccb3b96b630b74ac016070b3d0da4b987ad9dc6;p=platform%2Fupstream%2Fllvm.git [X86] Use cached OptForSize in X86ISelDAGToDAG.cpp instead of pulling it from the function attribute. NFCI llvm-svn: 357297 --- diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index 1832cd2..444df1a 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/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.