@@ -134,6 +134,9 @@ void boo() {
134134void goo () {
135135 int a[10 ];
136136 // 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
137140 [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
138141 a[i] = 0 ;
139142 // no diagnostics are expected
@@ -269,6 +272,10 @@ void zoo() {
269272 [[intel::max_concurrency (2 )]]
270273 [[intel::initiation_interval (2 )]] for (int i = 0 ; i != 10 ; ++i)
271274 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 ;
272279 [[intel::fpga_pipeline]]
273280 // expected-error@+1 {{duplicate Intel FPGA loop attribute 'fpga_pipeline'}}
274281 [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
@@ -355,23 +362,52 @@ void zoo() {
355362// Test for Intel FPGA loop attributes compatibility
356363void loop_attrs_compatibility () {
357364 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
358369 [[intel::fpga_pipeline]] [[intel::loop_coalesce]] for (int i = 0 ; i != 10 ; ++i)
359370 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}}
361372 // 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)
365382 a[i] = 0 ;
366-
367383 // expected-error@+2 {{'fpga_pipeline' and 'speculated_iterations' attributes are not compatible}}
368384 // expected-note@+1 {{conflicting attribute is here}}
369385 [[intel::speculated_iterations (0 )]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
370386 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 ;
371395 // expected-error@+2 {{'fpga_pipeline' and 'initiation_interval' attributes are not compatible}}
372396 // expected-note@+1 {{conflicting attribute is here}}
373397 [[intel::initiation_interval (10 )]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
374398 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 ;
375411
376412 // no diagnostics are expected
377413 [[intel::fpga_pipeline]] [[intel::loop_coalesce]] for (int i = 0 ; i != 10 ; ++i)
@@ -406,6 +442,10 @@ void loop_attrs_compatibility() {
406442 // expected-note@+1 {{conflicting attribute is here}}
407443 [[intel::ivdep]] [[intel::fpga_pipeline]] for (int i = 0 ; i != 10 ; ++i)
408444 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 ;
409449}
410450
411451template <int A, int B, int C>
0 commit comments