diff options
| author | Reid Kleckner <rnk@google.com> | 2018-06-04 21:39:20 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-06-04 21:39:20 +0000 |
| commit | 89fbd551450d22ef01a33d208870407c7eff208b (patch) | |
| tree | c023a11822186c0c13945b07a28fda68f3bc6cfb /clang/lib/Basic | |
| parent | 36df9d8514f755598d435a7f3205648dc0239c1d (diff) | |
| download | bcm5719-llvm-89fbd551450d22ef01a33d208870407c7eff208b.tar.gz bcm5719-llvm-89fbd551450d22ef01a33d208870407c7eff208b.zip | |
Revert r333791 "Cap "voluntary" vector alignment at 16 for all Darwin 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
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/Targets/OSTargets.h | 3 | ||||
| -rw-r--r-- | clang/lib/Basic/Targets/X86.h | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index 6cc3c095557..18239a2ec77 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -113,9 +113,6 @@ public: } this->MCountName = "\01mcount"; - - // Cap vector alignment at 16 bytes for all Darwin platforms. - this->MaxVectorAlign = 128; } std::string isValidSectionSpecifier(StringRef SR) const override { diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 9d277e94cc0..5b862face9b 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -421,6 +421,7 @@ public: LongDoubleWidth = 128; LongDoubleAlign = 128; SuitableAlign = 128; + MaxVectorAlign = 256; // The watchOS simulator uses the builtin bool type for Objective-C. llvm::Triple T = llvm::Triple(Triple); if (T.isWatchOS()) @@ -436,6 +437,9 @@ public: if (!DarwinTargetInfo<X86_32TargetInfo>::handleTargetFeatures(Features, Diags)) return false; + // We now know the features we have: we can decide how to align vectors. + MaxVectorAlign = + hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128; return true; } }; @@ -798,6 +802,9 @@ public: if (!DarwinTargetInfo<X86_64TargetInfo>::handleTargetFeatures(Features, Diags)) return false; + // We now know the features we have: we can decide how to align vectors. + MaxVectorAlign = + hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128; return true; } }; |

