Debian Codegraph @

clang/test/Driver/no-gpu-bundle-respected.hip

raw
1 // RUN: %clang -ccc-print-phases -c -emit-llvm \
2 // RUN: --offload-arch=gfx900,gfx1030 -O3 -x hip %s \
3 // RUN: 2>&1 | FileCheck %s --check-prefix=BUNDLE
4
5 // RUN: %clang -ccc-print-phases -c -emit-llvm \
6 // RUN: --gpu-bundle-output --offload-arch=gfx900,gfx1030 -O3 -x hip %s \
7 // RUN: 2>&1 | FileCheck %s --check-prefix=BUNDLE
8
9 // RUN: %clang -ccc-print-phases -c -emit-llvm \
10 // RUN: --no-gpu-bundle-output --offload-arch=gfx900,gfx1030 -O3 -x hip %s \
11 // RUN: 2>&1 | FileCheck %s --check-prefixes=COMPILER,GFX1030,GFX900,OFFLOAD,NOBUNDLE
12
13 // BUNDLE: clang-offload-bundler
14 // NOBUNDLE-NOT: clang-offload-bundler
15
16 // COM: sanity checks
17 // COMPILER: compiler
18 // GFX1030: (device-hip, gfx1030)
19 // GFX900: (device-hip, gfx900)
20 // OFFLOAD: offload
21
22 int square(int num) {
23 return num * num;
24 }