|
1 | 1 | // RUN: %clang_cc1 -S -cl-denorms-are-zero -o - %s 2>&1
|
2 | 2 | // RUN: %clang_cc1 -emit-llvm -cl-denorms-are-zero -o - -triple amdgcn--amdhsa -target-cpu fiji %s | FileCheck %s
|
3 | 3 | // RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn--amdhsa -target-cpu fiji %s | FileCheck %s --check-prefix=CHECK-DENORM
|
4 |
| -// RUN: %clang_cc1 -emit-llvm -target-feature +fp32-denormals -target-feature -fp64-denormals -cl-denorms-are-zero -o - -triple amdgcn--amdhsa -target-cpu fiji %s | FileCheck --check-prefix=CHECK-FEATURE %s |
| 4 | +// RUN: %clang_cc1 -emit-llvm -target-feature +fp32-denormals -target-feature -fp64-fp16-denormals -cl-denorms-are-zero -o - -triple amdgcn--amdhsa -target-cpu fiji %s | FileCheck --check-prefix=CHECK-FEATURE %s |
5 | 5 |
|
6 | 6 | // For non-amdgcn targets, this test just checks that the -cl-denorms-are-zero argument is accepted
|
7 | 7 | // by clang. This option is currently a no-op, which is allowed by the
|
8 | 8 | // OpenCL specification.
|
9 | 9 |
|
10 | 10 | // For amdgcn target cpu fiji, fp32 should be flushed since fiji does not support fp32 denormals, unless +fp32-denormals is
|
11 |
| -// explicitly set. amdgcn target always do not flush fp64 denormals. |
| 11 | +// explicitly set. amdgcn target always do not flush fp64 denormals. The control for fp64 and fp16 denormals is the same. |
12 | 12 |
|
13 | 13 | // CHECK-DENORM-LABEL: define void @f()
|
14 |
| -// CHECK-DENORM: attributes #{{[0-9]*}} = {{{[^}]*}} "target-features"="{{[^"]*}}+fp64-denormals,{{[^"]*}}-fp32-denormals{{[^"]*}}" |
| 14 | +// CHECK-DENORM: attributes #{{[0-9]*}} = {{{[^}]*}} "target-features"="{{[^"]*}}+fp64-fp16-denormals,{{[^"]*}}-fp32-denormals{{[^"]*}}" |
15 | 15 | // CHECK-LABEL: define void @f()
|
16 |
| -// CHECK: attributes #{{[0-9]*}} = {{{[^}]*}} "target-features"="{{[^"]*}}+fp64-denormals,{{[^"]*}}-fp32-denormals{{[^"]*}}" |
| 16 | +// CHECK: attributes #{{[0-9]*}} = {{{[^}]*}} "target-features"="{{[^"]*}}+fp64-fp16-denormals,{{[^"]*}}-fp32-denormals{{[^"]*}}" |
17 | 17 | // CHECK-FEATURE-LABEL: define void @f()
|
18 |
| -// CHECK-FEATURE: attributes #{{[0-9]*}} = {{{[^}]*}} "target-features"="{{[^"]*}}+fp32-denormals,{{[^"]*}}-fp64-denormals{{[^"]*}}" |
| 18 | +// CHECK-FEATURE: attributes #{{[0-9]*}} = {{{[^}]*}} "target-features"="{{[^"]*}}+fp32-denormals,{{[^"]*}}-fp64-fp16-denormals{{[^"]*}}" |
19 | 19 | void f() {}
|
0 commit comments