[llvm] r357297 - [X86] Use cached OptForSize in X86ISelDAGToDAG.cpp instead of pulling it from the function attribute. NFCI

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 11:36:40 PDT 2019


Author: ctopper
Date: Fri Mar 29 11:36:40 2019
New Revision: 357297

URL: http://llvm.org/viewvc/llvm-project?rev=357297&view=rev
Log:
[X86] Use cached OptForSize in X86ISelDAGToDAG.cpp instead of pulling it from the function attribute. NFCI

Modified:
    llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=357297&r1=357296&r2=357297&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Mar 29 11:36:40 2019
@@ -2690,8 +2690,7 @@ bool X86DAGToDAGISel::foldLoadStoreIntoM
   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.




More information about the llvm-commits mailing list