llvm-capstone/clang/test/CodeGen/tls-maxalign-modflag.c
Wolfgang Pieb 5d07e0448e [TLS]: Clamp the alignment of TLS global variables if required by the target
Adding a module flag 'MaxTLSAlign' describing the maximum alignment a global TLS
variable can have. Optimizers are prevented from increasing the alignment of such
variables beyond this threshold.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D140123
2023-02-08 10:34:56 -08:00

13 lines
415 B
C

// REQUIRES: x86-registered-target
// Test that we get the module flag TLSMaxAlign on the PS platforms.
// RUN: %clang_cc1 -triple x86_64-scei-ps4 -S -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-scei-ps5 -S -emit-llvm -o - %s | FileCheck %s
int main(void) {
return 0;
}
// CHECK-DAG: ![[MDID:[0-9]+]] = !{i32 1, !"MaxTLSAlign", i32 256}
// CHECK-DAG: llvm.module.flags = {{.*}}![[MDID]]