Debian Codegraph @

llvm/test/CodeGen/PowerPC/check-aix-small-local-exec-tls-opt-IRattribute.ll

raw
1 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -ppc-asm-full-reg-names \
2 ; RUN: < %s | FileCheck %s
3 ; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -ppc-asm-full-reg-names \
4 ; RUN: < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-SUPPORTED
5 ; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -ppc-asm-full-reg-names \
6 ; RUN: < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-SUPPORTED
7 ; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -ppc-asm-full-reg-names \
8 ; RUN: -data-sections=false < %s 2>&1 | \
9 ; RUN: FileCheck %s --check-prefix=CHECK-UNSUPPORTED-NO-DATASEC
10
11 define dso_local signext i32 @testWithIRAttrLocalExec() #0 {
12 entry:
13 ret i32 0
14 }
15
16 define dso_local signext i32 @testWithIRAttrLocalDynamic() #1 {
17 entry:
18 ret i32 0
19 }
20
21 ; Check that the aix-small-local-[exec|dynamic]-tls attribute is not supported on Linux and AIX (32-bit).
22 ; CHECK-NOT-SUPPORTED: The aix-small-local-[exec|dynamic]-tls attribute is only supported on AIX in 64-bit mode.
23
24 ; Check that the aix-small-local-[exec|dynamic]-tls attribute is only supported when
25 ; data sections are enabled.
26 ; CHECK-UNSUPPORTED-NO-DATASEC: The aix-small-local-[exec|dynamic]-tls attribute can only be specified with -data-sections.
27
28 ; Make sure that the test was actually compiled successfully after using the
29 ; aix-small-local-[exec|dynamic]-tls attribute.
30 ; CHECK-LABEL: testWithIRAttrLocalExec:
31 ; CHECK: li r3, 0
32 ; CHECK-NEXT: blr
33 ; CHECK-LABEL: testWithIRAttrLocalDynamic:
34 ; CHECK: li r3, 0
35 ; CHECK-NEXT: blr
36
37 attributes #0 = { "target-features"="+aix-small-local-exec-tls" }
38 attributes #1 = { "target-features"="+aix-small-local-dynamic-tls" }
39