@@ -134,6 +134,9 @@ void boo() {
134
134
void goo () {
135
135
int a[10 ];
136
136
// no diagnostics are expected
137
+ [[intel::disable_loop_pipelining]] for (int i = 0 ; i != 10 ; ++i)
138
+ a[i] = 0 ;
139
+ // no diagnostics are expected
137
140
[[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
138
141
a[i] = 0 ;
139
142
// no diagnostics are expected
@@ -269,6 +272,10 @@ void zoo() {
269
272
[[intel::max_concurrency (2 )]]
270
273
[[intel::initiation_interval (2 )]] for (int i = 0 ; i != 10 ; ++i)
271
274
a[i] = 0 ;
275
+ [[intel::disable_loop_pipelining]]
276
+ // expected-error@+1 {{duplicate Intel FPGA loop attribute 'disable_loop_pipelining'}}
277
+ [[intel::disable_loop_pipelining]] for (int i = 0 ; i != 10 ; ++i)
278
+ a[i] = 0 ;
272
279
[[intel::fpga_pipeline]]
273
280
// expected-error@+1 {{duplicate Intel FPGA loop attribute 'fpga_pipeline'}}
274
281
[[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
@@ -355,23 +362,52 @@ void zoo() {
355
362
// Test for Intel FPGA loop attributes compatibility
356
363
void loop_attrs_compatibility () {
357
364
int a[10 ];
365
+ // no diagnostics are expected
366
+ [[intel::disable_loop_pipelining]] [[intel::loop_coalesce]] for (int i = 0 ; i != 10 ; ++i)
367
+ a[i] = 0 ;
368
+ // no diagnostics are expected
358
369
[[intel::fpga_pipeline]] [[intel::loop_coalesce]] for (int i = 0 ; i != 10 ; ++i)
359
370
a[i] = 0 ;
360
- // expected-error@+4 {{'max_interleaving' and 'disable_loop_pipelining' attributes are not compatible}}
371
+ // expected-error@+2 {{'max_interleaving' and 'disable_loop_pipelining' attributes are not compatible}}
361
372
// expected-note@+1 {{conflicting attribute is here}}
362
- [[intel::disable_loop_pipelining]] // expected-warning {{attribute 'intel::disable_loop_pipelining' is deprecated}} \
363
- // expected-note {{did you mean to use 'intel::fpga_pipeline' instead?}}
364
- [[intel::max_interleaving (0 )]] for (int i = 0 ; i != 10 ; ++i)
373
+ [[intel::disable_loop_pipelining]] [[intel::max_interleaving (0 )]] for (int i = 0 ; i != 10 ; ++i)
374
+ a[i] = 0 ;
375
+ // expected-error@+2 {{'max_concurrency' and 'disable_loop_pipelining' attributes are not compatible}}
376
+ // expected-note@+1 {{conflicting attribute is here}}
377
+ [[intel::disable_loop_pipelining]] [[intel::max_concurrency (0 )]] for (int i = 0 ; i != 10 ; ++i)
378
+ a[i] = 0 ;
379
+ // expected-error@+2 {{'disable_loop_pipelining' and 'speculated_iterations' attributes are not compatible}}
380
+ // expected-note@+1 {{conflicting attribute is here}}
381
+ [[intel::speculated_iterations (0 )]] [[intel::disable_loop_pipelining]] for (int i = 0 ; i != 10 ; ++i)
365
382
a[i] = 0 ;
366
-
367
383
// expected-error@+2 {{'fpga_pipeline' and 'speculated_iterations' attributes are not compatible}}
368
384
// expected-note@+1 {{conflicting attribute is here}}
369
385
[[intel::speculated_iterations (0 )]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
370
386
a[i] = 0 ;
387
+ // expected-error@+2 {{'disable_loop_pipelining' and 'initiation_interval' attributes are not compatible}}
388
+ // expected-note@+1 {{conflicting attribute is here}}
389
+ [[intel::initiation_interval (10 )]] [[intel::disable_loop_pipelining]] for (int i = 0 ; i != 10 ; ++i)
390
+ a[i] = 0 ;
391
+ // expected-error@+2 {{'ivdep' and 'disable_loop_pipelining' attributes are not compatible}}
392
+ // expected-note@+1 {{conflicting attribute is here}}
393
+ [[intel::disable_loop_pipelining]] [[intel::ivdep]] for (int i = 0 ; i != 10 ; ++i)
394
+ a[i] = 0 ;
371
395
// expected-error@+2 {{'fpga_pipeline' and 'initiation_interval' attributes are not compatible}}
372
396
// expected-note@+1 {{conflicting attribute is here}}
373
397
[[intel::initiation_interval (10 )]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
374
398
a[i] = 0 ;
399
+ // no diagnostics are expected
400
+ [[intel::disable_loop_pipelining]] [[intel::nofusion]] for (int i = 0 ; i != 10 ; ++i)
401
+ a[i] = 0 ;
402
+ // no diagnostics are expected
403
+ [[intel::disable_loop_pipelining]] [[intel::loop_count_avg (8 )]] for (int i = 0 ; i != 10 ; ++i)
404
+ a[i] = 0 ;
405
+ [[intel::loop_count_min (8 )]] for (int i = 0 ; i != 10 ; ++i)
406
+ a[i] = 0 ;
407
+ [[intel::loop_count_max (8 )]] for (int i = 0 ; i != 10 ; ++i)
408
+ a[i] = 0 ;
409
+ [[intel::loop_count (8 )]] for (int i = 0 ; i != 10 ; ++i)
410
+ a[i] = 0 ;
375
411
376
412
// no diagnostics are expected
377
413
[[intel::fpga_pipeline]] [[intel::loop_coalesce]] for (int i = 0 ; i != 10 ; ++i)
@@ -406,6 +442,10 @@ void loop_attrs_compatibility() {
406
442
// expected-note@+1 {{conflicting attribute is here}}
407
443
[[intel::ivdep]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
408
444
a[i] = 0 ;
445
+
446
+ // no diagnostics are expected
447
+ [[intel::disable_loop_pipelining]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
448
+ a[i] = 0 ;
409
449
}
410
450
411
451
template <int A, int B, int C>
0 commit comments