| 1 | // REQUIRES: clang-driver |
| 2 | // REQUIRES: x86-registered-target |
| 3 | // REQUIRES: amdgpu-registered-target |
| 4 | |
| 5 | // Test flush-denormals-to-zero enabled uses oclc_daz_opt_on |
| 6 | |
| 7 | // RUN: %clang -### -target x86_64-linux-gnu \ |
| 8 | // RUN: -x hip --cuda-gpu-arch=gfx900 \ |
| 9 | // RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 10 | // RUN: -fcuda-flush-denormals-to-zero \ |
| 11 | // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 12 | // RUN: 2>&1 | FileCheck %s --check-prefixes=COM,FLUSHD |
| 13 | |
| 14 | // Test flush-denormals-to-zero disabled uses oclc_daz_opt_off |
| 15 | |
| 16 | // RUN: %clang -### -target x86_64-linux-gnu \ |
| 17 | // RUN: -x hip --cuda-gpu-arch=gfx900 \ |
| 18 | // RUN: --hip-device-lib-path=%S/Inputs/hip_dev_lib \ |
| 19 | // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ |
| 20 | // RUN: 2>&1 | FileCheck %s --check-prefixes=COM,NOFLUSHD |
| 21 | |
| 22 | |
| 23 | // COM: [[LLVM_LINK:"*.llvm-link"]] |
| 24 | // COM-SAME: "{{.*}}hip.amdgcn.bc" "{{.*}}opencl.amdgcn.bc" |
| 25 | // COM-SAME: "{{.*}}ocml.amdgcn.bc" "{{.*}}ockl.amdgcn.bc" |
| 26 | // FLUSHD-SAME: {{.*}} "{{.*}}oclc_daz_opt_on.amdgcn.bc" |
| 27 | // NOFLUSHD-SAME: {{.*}} "{{.*}}oclc_daz_opt_off.amdgcn.bc" |
| 28 | // COM-SAME: {{.*}} "-o" "{{.*}}-gfx900-linked-{{.*bc}}" |
| 29 | |
| 30 | |