[llvm-commits] [llvm] r102604 - /llvm/trunk/include/llvm/ADT/SmallVector.h
Torok Edwin
edwintorok at gmail.com
Wed Apr 28 23:43:12 PDT 2010
Author: edwin
Date: Thu Apr 29 01:43:12 2010
New Revision: 102604
URL: http://llvm.org/viewvc/llvm-project?rev=102604&view=rev
Log:
Fix PR6910.
Limit alignment in SmallVector 8, otherwise GCC assumes 16 byte alignment.
opetaror new, and malloc only return 8-byte aligned memory on 32-bit Linux,
which cause a crash if code is compiled with -O3 (or -ftree-vectorize) and some
SmallVector code is vectorized.
Modified:
llvm/trunk/include/llvm/ADT/SmallVector.h
Modified: llvm/trunk/include/llvm/ADT/SmallVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=102604&r1=102603&r2=102604&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallVector.h Thu Apr 29 01:43:12 2010
@@ -59,7 +59,7 @@
// number of union instances for the space, which guarantee maximal alignment.
struct U {
#ifdef __GNUC__
- char X __attribute__((aligned));
+ char X __attribute__((aligned(8)));
#else
union {
double D;
More information about the llvm-commits
mailing list