summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/vector-alignment.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert r333791 "Cap "voluntary" vector alignment at 16 for all Darwin ↵Reid Kleckner2018-06-041-60/+24
| | | | | | | | | | | | | | platforms." Adding __attribute__((aligned(32))) to __m256 breaks the implementation of _mm256_loadu_ps on Windows. On Windows, alignment attributes have higher precedence than packing attributes. We also might want to carefully consider the consequences of changing our vector typedefs, since many users copy them and invent their own new, non-Intel specific vector type names. llvm-svn: 333958
* Cap "voluntary" vector alignment at 16 for all Darwin platforms.John McCall2018-06-011-24/+60
| | | | | | | | | | | | | | | | | | | | | This fixes two major problems: - We were not capping vector alignment as desired on 32-bit ARM. - We were using different alignments based on the AVX settings on Intel, so we did not have a consistent ABI. This is an ABI break, but we think we can get away with it because vectors tend to be used mostly in inline code (which is why not having a consistent ABI has not proven disastrous on Intel). Intel's AVX types are specified as having 32-byte / 64-byte alignment, so align them explicitly instead of relying on the base ABI rule. Note that this sort of attribute is stripped from template arguments in template substitution, so there's a possibility that code templated over vectors will produce inadequately-aligned objects. The right long-term solution for this is for alignment attributes to be interpreted as true qualifiers and thus preserved in the canonical type. llvm-svn: 333791
* [X86] Bump Darwin MaxVectorAlign to 64 when AVX512 is enabled.Ahmed Bougacha2015-08-271-0/+10
| | | | | | | | | | | Without this, 64-byte vector types (__m512), specified to be 64-byte aligned in the AVX512 draft SysV ABI, will only be 32-byte aligned. This is analoguous to AVX, for which we accept 32-byte max alignment. Differential Revision: http://reviews.llvm.org/D10724 llvm-svn: 246230
* [X86] Conditionalize Darwin MaxVectorAlign on the presence of AVX.Ahmed Bougacha2015-08-271-13/+26
| | | | | | | | | There's no point in using a larger alignment if we have no instructions that would benefit from it. Differential Revision: http://reviews.llvm.org/D12389 llvm-svn: 246229
* Add a per target max vector alignment field (e.g., 32-byte alignment for x86 ↵Chad Rosier2012-07-131-0/+38
due to AVX). Currently, if no aligned attribute is specified the alignment of a vector is inferred from its size. Thus, very large vectors will be over-aligned with no benefit. Target owners should set this target max. llvm-svn: 160209
OpenPOWER on IntegriCloud