You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang/test/SemaSYCL/intel-max-work-group-size-device.cpp
+5-31Lines changed: 5 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -86,43 +86,17 @@ int main() {
86
86
h.single_task<classtest_kernel3>(
87
87
[]() { func_do_not_ignore(); });
88
88
89
-
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel4
90
-
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}}
91
-
// CHECK-NEXT: ConstantExpr{{.*}}'int'
92
-
// CHECK-NEXT: value: Int 8
93
-
// CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
94
-
// CHECK-NEXT: ConstantExpr{{.*}}'int'
95
-
// CHECK-NEXT: value: Int 8
96
-
// CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
97
-
// CHECK-NEXT: ConstantExpr{{.*}}'int'
98
-
// CHECK-NEXT: value: Int -8
99
-
// CHECK-NEXT: UnaryOperator{{.*}} 'int' prefix '-'
100
-
// CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
101
-
// expected-warning@+2{{implicit conversion changes signedness: 'int' to 'unsigned long long'}}
89
+
#ifdef TRIGGER_ERROR
102
90
h.single_task<classtest_kernel4>(
103
-
[]() [[intel::max_work_group_size(8, 8, -8)]]{});
91
+
[]() [[intel::max_work_group_size(8, 8, -8)]]{});// expected-error{{'max_work_group_size' attribute requires a positive integral compile time constant expression}}
104
92
105
-
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel5
106
-
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}}
107
-
// CHECK-NEXT: ConstantExpr{{.*}}'int'
108
-
// CHECK-NEXT: value: Int -8
109
-
// CHECK-NEXT: UnaryOperator{{.*}} 'int' prefix '-'
110
-
// CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
111
-
// CHECK-NEXT: ConstantExpr{{.*}}'int'
112
-
// CHECK-NEXT: value: Int 8
113
-
// CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
114
-
// CHECK-NEXT: ConstantExpr{{.*}}'int'
115
-
// CHECK-NEXT: value: Int -8
116
-
// CHECK-NEXT: UnaryOperator{{.*}} 'int' prefix '-'
117
-
// CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
118
-
// expected-warning@+2 2{{implicit conversion changes signedness: 'int' to 'unsigned long long'}}
[]() [[intel::max_work_group_size(-8, 8, -8)]]{});// expected-error 2{{'max_work_group_size' attribute requires a positive integral compile time constant expression}}
95
+
122
96
[[intel::max_work_group_size(1, 1, 1)]] int Var = 0; // expected-error{{'max_work_group_size' attribute only applies to functions}}
123
97
124
98
h.single_task<classtest_kernel6>(
125
-
[]() [[intel::max_work_group_size(0, 1, 3)]]{}); // expected-error{{'max_work_group_size' attribute must be greater than 0}}
99
+
[]() [[intel::max_work_group_size(0, 1, 3)]]{}); // expected-error{{'max_work_group_size' attribute requires a positive integral compile time constant expression}}
126
100
127
101
h.single_task<classtest_kernel7>(
128
102
[]() [[intel::max_work_group_size(1.2f, 1, 3)]]{}); // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'float'}}
0 commit comments