|
2 | 2 | // REQUIRES: x86-registered-target |
3 | 3 | // REQUIRES: amdgpu-registered-target |
4 | 4 |
|
5 | | -// Test flush-denormals-to-zero enabled uses oclc_daz_opt_on |
| 5 | +// Test if oclc_daz_opt_on or if oclc_daz_opt_off is linked depending on |
| 6 | +// expected denormal mode. |
6 | 7 |
|
| 8 | +// Test subtarget with flushing on by default. |
| 9 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 10 | +// RUN: --cuda-gpu-arch=gfx803 \ |
| 11 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 12 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 13 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,FLUSHD |
| 14 | + |
| 15 | + |
| 16 | +// Test subtarget with flushing off by ddefault. |
7 | 17 | // RUN: %clang -### -target x86_64-linux-gnu \ |
8 | 18 | // RUN: --cuda-gpu-arch=gfx900 \ |
9 | 19 | // RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 20 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 21 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,NOFLUSHD |
| 22 | + |
| 23 | + |
| 24 | +// Test explicit flag, opposite of target default. |
| 25 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 26 | +// RUN: --cuda-gpu-arch=gfx900 \ |
10 | 27 | // RUN: -fcuda-flush-denormals-to-zero \ |
| 28 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
11 | 29 | // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
12 | 30 | // RUN: 2>&1 | FileCheck %s --check-prefixes=COM,FLUSHD |
13 | 31 |
|
14 | | -// Test flush-denormals-to-zero disabled uses oclc_daz_opt_off |
15 | 32 |
|
| 33 | +// Test explicit flag, opposite of target default. |
| 34 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 35 | +// RUN: --cuda-gpu-arch=gfx803 \ |
| 36 | +// RUN: -fno-cuda-flush-denormals-to-zero \ |
| 37 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 38 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 39 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,NOFLUSHD |
| 40 | + |
| 41 | + |
| 42 | +// Test explicit flag, same as target default. |
16 | 43 | // RUN: %clang -### -target x86_64-linux-gnu \ |
17 | 44 | // RUN: --cuda-gpu-arch=gfx900 \ |
| 45 | +// RUN: -fno-cuda-flush-denormals-to-zero \ |
18 | 46 | // RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
19 | 47 | // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
20 | 48 | // RUN: 2>&1 | FileCheck %s --check-prefixes=COM,NOFLUSHD |
21 | 49 |
|
| 50 | + |
| 51 | +// Test explicit flag, same as target default. |
| 52 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 53 | +// RUN: --cuda-gpu-arch=gfx803 \ |
| 54 | +// RUN: -fcuda-flush-denormals-to-zero \ |
| 55 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 56 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 57 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,FLUSHD |
| 58 | + |
| 59 | + |
| 60 | +// Test last flag wins, not flushing |
| 61 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 62 | +// RUN: --cuda-gpu-arch=gfx803 \ |
| 63 | +// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ |
| 64 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 65 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 66 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,NOFLUSHD |
| 67 | + |
| 68 | + |
| 69 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 70 | +// RUN: --cuda-gpu-arch=gfx900 \ |
| 71 | +// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ |
| 72 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 73 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 74 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,NOFLUSHD |
| 75 | + |
| 76 | + |
| 77 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 78 | +// RUN: --cuda-gpu-arch=gfx900 \ |
| 79 | +// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ |
| 80 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 81 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 82 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,FLUSHD |
| 83 | + |
| 84 | + |
| 85 | +// RUN: %clang -### -target x86_64-linux-gnu \ |
| 86 | +// RUN: --cuda-gpu-arch=gfx803 \ |
| 87 | +// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ |
| 88 | +// RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 89 | +// RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 90 | +// RUN: 2>&1 | FileCheck %s --check-prefixes=COM,FLUSHD |
| 91 | + |
| 92 | + |
22 | 93 | // Test environment variable HIP_DEVICE_LIB_PATH |
23 | 94 |
|
24 | 95 | // RUN: env HIP_DEVICE_LIB_PATH=%S/Inputs/hip_dev_lib \ |
|
33 | 104 | // COM-SAME: "-mlink-builtin-bitcode" "{{.*}}ockl.amdgcn.bc" |
34 | 105 | // FLUSHD-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_daz_opt_on.amdgcn.bc" |
35 | 106 | // NOFLUSHD-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_daz_opt_off.amdgcn.bc" |
36 | | - |
|
0 commit comments