|
35 | 35 | // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \
|
36 | 36 | // RUN: %s 2>&1 | FileCheck -check-prefixes=XNACKNEG %s
|
37 | 37 |
|
| 38 | +// Check -fno-gpu-sanitize with supported and unsupported GPU. |
| 39 | +// Sanitizer should be disabled for all GPU's and there should be no warnings about unsupported |
| 40 | +// GPU. |
| 41 | + |
| 42 | +// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ |
| 43 | +// RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fno-gpu-sanitize \ |
| 44 | +// RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ |
| 45 | +// RUN: %s 2>&1 | FileCheck -check-prefixes=NOGPU %s |
| 46 | + |
| 47 | +// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ |
| 48 | +// RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fno-gpu-sanitize \ |
| 49 | +// RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ |
| 50 | +// RUN: %s 2>&1 | FileCheck -check-prefixes=NOGPUNEG %s |
| 51 | + |
38 | 52 | // CHECK-NOT: {{"[^"]*clang[^"]*".* "-fcuda-is-device".* "-fsanitize=address"}}
|
39 | 53 | // CHECK-NOT: {{"[^"]*clang[^"]*".* "-fcuda-is-device".* "-mlink-bitcode-file" ".*asanrtl.bc"}}
|
40 | 54 | // CHECK-NOT: {{"[^"]*lld(\.exe){0,1}".* ".*hip.bc"}}
|
|
65 | 79 | // XNACKNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx900".* "-target-feature" "-xnack"}}
|
66 | 80 | // XNACKNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx906"}}
|
67 | 81 | // XNACKNEG-NOT: {{"[^"]*lld(\.exe){0,1}".* ".*hip.bc"}}
|
| 82 | + |
| 83 | +// NOGPU-DAG: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack"}} |
| 84 | +// NOGPU-DAG: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "-xnack"}} |
| 85 | +// NOGPU-DAG: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx906"}} |
| 86 | +// NOGPU-DAG: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address,leak"}} |
| 87 | +// NOGPUNEG-NOT: warning: ignoring '-fsanitize=leak' option as it is not currently supported for target 'amdgcn-amd-amdhsa' |
| 88 | +// NOGPUNEG-NOT: warning: ignoring '-fsanitize=address' option as it is not currently supported for offload arch 'gfx900:xnack-'. Use it with an offload arch containing 'xnack+' instead |
| 89 | +// NOGPUNEG-NOT: warning: ignoring '-fsanitize=address' option as it is not currently supported for offload arch 'gfx906'. Use it with an offload arch containing 'xnack+' instead |
| 90 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack".* "-fsanitize=address"}} |
| 91 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack".* "-fsanitize=address,leak"}} |
| 92 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "-xnack".* "-fsanitize=address,leak"}} |
| 93 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx906".* "-fsanitize=address,leak"}} |
| 94 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack".* "-fsanitize=address"}} |
| 95 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "-xnack".* "-fsanitize=address"}} |
| 96 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx906".* "-fsanitize=address"}} |
| 97 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack"}} |
| 98 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx900".* "-target-feature" "-xnack"}} |
| 99 | +// NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx906"}} |
| 100 | +// NOGPUNEG-NOT: {{"[^"]*lld(\.exe){0,1}".* ".*hip.bc"}} |
0 commit comments