xref: /llvm-project/llvm/test/CodeGen/PowerPC/check-aix-small-local-exec-tls-opt.ll (revision 09d51a841dcfbc41c3d7f3274b109b5f9fb09bb0)
1; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mattr=+aix-small-local-exec-tls \
2; RUN:   -ppc-asm-full-reg-names < %s | FileCheck %s
3; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -mattr=+aix-small-local-exec-tls \
4; RUN:   -ppc-asm-full-reg-names < %s 2>&1 | \
5; RUN:   FileCheck %s --check-prefix=CHECK-NOT-SUPPORTED
6; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -mattr=+aix-small-local-exec-tls \
7; RUN:   -ppc-asm-full-reg-names < %s 2>&1 | \
8; RUN:   FileCheck %s --check-prefix=CHECK-NOT-SUPPORTED
9; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mattr=+aix-small-local-dynamic-tls \
10; RUN:   -ppc-asm-full-reg-names < %s | FileCheck %s
11; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -mattr=+aix-small-local-dynamic-tls \
12; RUN:   -ppc-asm-full-reg-names < %s 2>&1 | \
13; RUN:   FileCheck %s --check-prefix=CHECK-NOT-SUPPORTED
14; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -mattr=+aix-small-local-dynamic-tls \
15; RUN:   -ppc-asm-full-reg-names < %s 2>&1 | \
16; RUN:   FileCheck %s --check-prefix=CHECK-NOT-SUPPORTED
17
18define dso_local signext i32 @testNoIRAttr() {
19entry:
20  ret i32 0
21}
22
23; Check that the aix-small-local-[exec|dynamic]-tls attribute is not supported on Linux and AIX (32-bit).
24; CHECK-NOT-SUPPORTED: The aix-small-local-[exec|dynamic]-tls attribute is only supported on AIX in 64-bit mode.
25
26; Make sure that the test was actually compiled successfully after using the
27; aix-small-local-[exec|dynamic]-tls attribute.
28; CHECK-LABEL: testNoIRAttr:
29; CHECK:        li r3, 0
30; CHECK-NEXT:   blr
31