diff options
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, 3 insertions, 7 deletions
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index 18239a2ec77..6cc3c095557 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -113,6 +113,9 @@ 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 5b862face9b..9d277e94cc0 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -421,7 +421,6 @@ 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()) @@ -437,9 +436,6 @@ 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; } }; @@ -802,9 +798,6 @@ 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; } }; |