[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / amdgpu-toolchain.c
blobc1c5aa8e90e68681efb1b1fd73d81b493b79e21a
1 // RUN: %clang -### --target=amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
2 // RUN: %clang -### -g --target=amdgcn--amdhsa -mcpu=kaveri -nogpulib %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
3 // RUN: %clang -### --target=amdgcn-amd-amdpal -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
4 // RUN: %clang -### -g --target=amdgcn-amd-amdpal -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
5 // RUN: %clang -### --target=amdgcn-mesa-mesa3d -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
6 // RUN: %clang -### -g --target=amdgcn-mesa-mesa3d -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
8 // AS_LINK: "-cc1as"
9 // AS_LINK: ld.lld{{.*}} "--no-undefined" "-shared"
11 // DWARF_VER: "-dwarf-version=5"
13 // RUN: %clang -### --target=amdgcn--amdhsa -x assembler \
14 // RUN: -Wl,--unresolved-symbols=ignore-all %s 2>&1 | FileCheck -check-prefix=AS_LINK_UR %s
15 // RUN: %clang -### --target=amdgcn--amdhsa -x assembler \
16 // RUN: -Xlinker --unresolved-symbols=ignore-all %s 2>&1 | FileCheck -check-prefix=AS_LINK_UR %s
18 // AS_LINK_UR: "-cc1as"
19 // AS_LINK_UR: ld.lld{{.*}} "--no-undefined"{{.*}} "--unresolved-symbols=ignore-all"
21 // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx90a:xnack+:sramecc- -nogpulib \
22 // RUN: -L. -flto -fconvergent-functions %s 2>&1 | FileCheck -check-prefixes=LTO,MCPU %s
23 // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx90a:xnack+:sramecc- -nogpulib \
24 // RUN: -L. -fconvergent-functions %s 2>&1 | FileCheck -check-prefix=MCPU %s
25 // LTO: clang{{.*}} "-flto=full"{{.*}}"-fconvergent-functions"
26 // MCPU: ld.lld{{.*}}"-L."{{.*}}"-plugin-opt=mcpu=gfx90a"{{.*}}"-plugin-opt=-mattr=-sramecc,+xnack"
28 // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 -nogpulib \
29 // RUN: -fuse-ld=ld %s 2>&1 | FileCheck -check-prefixes=LD %s
30 // LD: ld.lld
32 // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 -nogpulib \
33 // RUN: -r %s 2>&1 | FileCheck -check-prefixes=RELO %s
34 // RELO-NOT: -shared
36 // RUN: %clang -target amdgcn-amd-amdhsa -march=gfx90a -stdlib -startfiles \
37 // RUN: -nogpulib -nogpuinc -### %s 2>&1 | FileCheck -check-prefix=STARTUP %s
38 // STARTUP: ld.lld{{.*}}"-lc" "-lm" "{{.*}}crt1.o"