[llvm-commits] [llvm] r145097 - in /llvm/trunk: lib/CodeGen/StackProtector.cpp test/CodeGen/X86/splat-scalar-load.ll
Bob Wilson
bob.wilson at apple.com
Tue Nov 22 23:13:57 PST 2011
Author: bwilson
Date: Wed Nov 23 01:13:56 2011
New Revision: 145097
URL: http://llvm.org/viewvc/llvm-project?rev=145097&view=rev
Log:
Enable stack protectors for all arrays, not just char arrays. rdar://5875909
Patch by Bill Wendling.
Modified:
llvm/trunk/lib/CodeGen/StackProtector.cpp
llvm/trunk/test/CodeGen/X86/splat-scalar-load.ll
Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=145097&r1=145096&r2=145097&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackProtector.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackProtector.cpp Wed Nov 23 01:13:56 2011
@@ -123,16 +123,11 @@
// protectors.
return true;
- if (ArrayType *AT = dyn_cast<ArrayType>(AI->getAllocatedType())) {
- // We apparently only care about character arrays.
- if (!AT->getElementType()->isIntegerTy(8))
- continue;
-
+ if (ArrayType *AT = dyn_cast<ArrayType>(AI->getAllocatedType()))
// If an array has more than SSPBufferSize bytes of allocated space,
// then we emit stack protectors.
if (SSPBufferSize <= TD->getTypeAllocSize(AT))
return true;
- }
}
}
Modified: llvm/trunk/test/CodeGen/X86/splat-scalar-load.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/splat-scalar-load.ll?rev=145097&r1=145096&r2=145097&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/splat-scalar-load.ll (original)
+++ llvm/trunk/test/CodeGen/X86/splat-scalar-load.ll Wed Nov 23 01:13:56 2011
@@ -1,7 +1,7 @@
; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 | FileCheck %s
; rdar://7434544
-define <2 x i64> @t2() nounwind ssp {
+define <2 x i64> @t2() nounwind {
entry:
; CHECK: t2:
; CHECK: pshufd $85, (%esp), %xmm0
More information about the llvm-commits
mailing list