[llvm-commits] [llvm] r143590 - /llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Bill Wendling isanbard at gmail.com
Wed Nov 2 16:20:59 PDT 2011


Author: void
Date: Wed Nov  2 18:20:58 2011
New Revision: 143590

URL: http://llvm.org/viewvc/llvm-project?rev=143590&view=rev
Log:
An array of chars of length 8 will also cause the stack protector to be inserted
into the function. Reflect that here so that the array will be placed next to
the SP.
<rdar://problem/10128329>

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=143590&r1=143589&r2=143590&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Wed Nov  2 18:20:58 2011
@@ -92,7 +92,7 @@
         // candidate. I.e., it would trigger the creation of a stack protector.
         bool MayNeedSP =
           (AI->isArrayAllocation() ||
-           (TySize > 8 && isa<ArrayType>(Ty) &&
+           (TySize >= 8 && isa<ArrayType>(Ty) &&
             cast<ArrayType>(Ty)->getElementType()->isIntegerTy(8)));
         StaticAllocaMap[AI] =
           MF->getFrameInfo()->CreateStackObject(TySize, Align, false, MayNeedSP);





More information about the llvm-commits mailing list