@@ -311,6 +311,30 @@ void zoo() {
311
311
[[intel::speculated_iterations (2 )]] for (int i = 0 ; i != 10 ; ++i)
312
312
a[i] = 0 ;
313
313
314
+ [[intel::speculated_iterations (1 )]] // expected-note 2{{previous attribute is here}}
315
+ [[intel::speculated_iterations (1 )]] // OK
316
+ [[intel::speculated_iterations (2 )]] // expected-error {{conflicting loop attribute 'speculated_iterations'}}
317
+ [[intel::speculated_iterations (4 )]] // expected-error {{conflicting loop attribute 'speculated_iterations'}}
318
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
319
+
320
+ [[intel::max_interleaving (0 )]] // expected-note 2{{previous attribute is here}}
321
+ [[intel::max_interleaving (0 )]] // OK
322
+ [[intel::max_interleaving (1 )]] // expected-error {{conflicting loop attribute 'max_interleaving'}}
323
+ [[intel::max_interleaving (1 )]] // expected-error {{conflicting loop attribute 'max_interleaving'}}
324
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
325
+
326
+ [[intel::max_concurrency (10 )]] // expected-note 2{{previous attribute is here}}
327
+ [[intel::max_concurrency (10 )]] // OK
328
+ [[intel::max_concurrency (20 )]] // expected-error {{conflicting loop attribute 'max_concurrency'}}
329
+ [[intel::max_concurrency (40 )]] // expected-error {{conflicting loop attribute 'max_concurrency'}}
330
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
331
+
332
+ [[intel::initiation_interval (10 )]] // expected-note 2{{previous attribute is here}}
333
+ [[intel::initiation_interval (10 )]] // OK
334
+ [[intel::initiation_interval (20 )]] // expected-error {{conflicting loop attribute 'initiation_interval'}}
335
+ [[intel::initiation_interval (40 )]] // expected-error {{conflicting loop attribute 'initiation_interval'}}
336
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
337
+
314
338
[[intel::ivdep]]
315
339
// expected-warning@+2 {{ignoring redundant Intel FPGA loop attribute 'ivdep': safelen INF >= safelen INF}}
316
340
// expected-note@-2 {{previous attribute is here}}
@@ -383,6 +407,12 @@ void zoo() {
383
407
[[intel::max_reinvocation_delay (20 )]] for (int i = 0 ; i != 10 ; ++i)
384
408
a[i] = 0 ;
385
409
410
+ [[intel::max_reinvocation_delay (10 )]] // expected-note 2{{previous attribute is here}}
411
+ [[intel::max_reinvocation_delay (10 )]] // OK
412
+ [[intel::max_reinvocation_delay (20 )]] // expected-error {{conflicting loop attribute 'max_reinvocation_delay'}}
413
+ [[intel::max_reinvocation_delay (40 )]] // expected-error {{conflicting loop attribute 'max_reinvocation_delay'}}
414
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
415
+
386
416
[[intel::enable_loop_pipelining]]
387
417
// expected-error@+1 {{duplicate Intel FPGA loop attribute 'enable_loop_pipelining'}}
388
418
[[intel::enable_loop_pipelining]] for (int i = 0 ; i != 10 ; ++i)
@@ -476,7 +506,7 @@ void ivdep_dependent() {
476
506
};
477
507
}
478
508
479
- template <int A, int B, int C>
509
+ template <int A, int B, int C, int D >
480
510
void ii_dependent () {
481
511
int a[10 ];
482
512
// expected-error@+1 {{'initiation_interval' attribute requires a positive integral compile time constant expression}}
@@ -491,6 +521,13 @@ void ii_dependent() {
491
521
[[intel::initiation_interval (A)]] // expected-note {{previous attribute is here}}
492
522
[[intel::initiation_interval (B)]] for (int i = 0 ; i != 10 ; ++i)
493
523
a[i] = 0 ;
524
+
525
+ [[intel::initiation_interval (A)]] // expected-note 2{{previous attribute is here}}
526
+ [[intel::initiation_interval (A)]] // OK
527
+ [[intel::initiation_interval (B)]] // expected-error {{conflicting loop attribute 'initiation_interval'}}
528
+ [[intel::initiation_interval (D)]] // expected-error {{conflicting loop attribute 'initiation_interval'}}
529
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
530
+
494
531
}
495
532
496
533
template <int A, int B, int C, int D>
@@ -515,6 +552,13 @@ void max_concurrency_dependent() {
515
552
// max_concurrency attribute accepts value 0.
516
553
[[intel::max_concurrency (D)]] for (int i = 0 ; i != 10 ; ++i)
517
554
a[i] = 0 ;
555
+
556
+ [[intel::max_concurrency (D)]] // expected-note 2{{previous attribute is here}}
557
+ [[intel::max_concurrency (D)]] // OK
558
+ [[intel::max_concurrency (A)]] // expected-error {{conflicting loop attribute 'max_concurrency'}}
559
+ [[intel::max_concurrency (B)]] // expected-error {{conflicting loop attribute 'max_concurrency'}}
560
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
561
+
518
562
}
519
563
520
564
template <int A, int B, int C, int D>
@@ -540,9 +584,16 @@ void max_interleaving_dependent() {
540
584
[[intel::max_interleaving (D)]]
541
585
[[intel::max_interleaving (D)]] for (int i = 0 ; i != 10 ; ++i)
542
586
a[i] = 0 ;
587
+
588
+ [[intel::max_interleaving (D)]] // expected-note 2{{previous attribute is here}}
589
+ [[intel::max_interleaving (D)]] // OK
590
+ [[intel::max_interleaving (C)]] // expected-error {{conflicting loop attribute 'max_interleaving'}}
591
+ [[intel::max_interleaving (C)]] // expected-error {{conflicting loop attribute 'max_interleaving'}}
592
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
593
+
543
594
}
544
595
545
- template <int A, int B, int C, int D>
596
+ template <int A, int B, int C, int D, int E >
546
597
void speculated_iterations_dependent () {
547
598
int a[10 ];
548
599
// expected-error@+1 {{'speculated_iterations' attribute requires a non-negative integral compile time constant expression}}
@@ -561,6 +612,13 @@ void speculated_iterations_dependent() {
561
612
[[intel::speculated_iterations (B)]]
562
613
[[intel::speculated_iterations (B)]] for (int i = 0 ; i != 10 ; ++i)
563
614
a[i] = 0 ;
615
+
616
+ [[intel::speculated_iterations (A)]] // expected-note 2{{previous attribute is here}}
617
+ [[intel::speculated_iterations (A)]] // OK
618
+ [[intel::speculated_iterations (B)]] // expected-error {{conflicting loop attribute 'speculated_iterations'}}
619
+ [[intel::speculated_iterations (E)]] // expected-error {{conflicting loop attribute 'speculated_iterations'}}
620
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
621
+
564
622
}
565
623
566
624
template <int A, int B, int C>
@@ -624,7 +682,7 @@ void loop_count_control_dependent() {
624
682
a[i] = 0 ;
625
683
}
626
684
627
- template <int A, int B, int C>
685
+ template <int A, int B, int C, int D >
628
686
void max_reinvocation_delay_dependent () {
629
687
int a[10 ];
630
688
// expected-error@+1 {{'max_reinvocation_delay' attribute requires a positive integral compile time constant expression}}
@@ -639,6 +697,13 @@ void max_reinvocation_delay_dependent() {
639
697
[[intel::max_reinvocation_delay (A)]]
640
698
[[intel::max_reinvocation_delay (A)]] for (int i = 0 ; i != 10 ; ++i)
641
699
a[i] = 0 ;
700
+
701
+ [[intel::max_reinvocation_delay (A)]] // expected-note 2{{previous attribute is here}}
702
+ [[intel::max_reinvocation_delay (A)]] // OK
703
+ [[intel::max_reinvocation_delay (B)]] // expected-error {{conflicting loop attribute 'max_reinvocation_delay'}}
704
+ [[intel::max_reinvocation_delay (D)]] // expected-error {{conflicting loop attribute 'max_reinvocation_delay'}}
705
+ for (int i = 0 ; i != 10 ; ++i) { a[i] = 0 ; }
706
+
642
707
}
643
708
644
709
void check_max_concurrency_expression () {
@@ -815,14 +880,14 @@ int main() {
815
880
// expected-note@-1 +{{in instantiation of function template specialization}}
816
881
ivdep_dependent<2 , 4 , -1 >();
817
882
// expected-note@-1 +{{in instantiation of function template specialization}}
818
- ii_dependent<2 , 4 , -1 >();
883
+ ii_dependent<2 , 4 , -1 , 8 >();
819
884
// expected-note@-1 +{{in instantiation of function template specialization}}
820
885
max_concurrency_dependent<1 , 4 , -2 , 0 >(); // expected-note{{in instantiation of function template specialization 'max_concurrency_dependent<1, 4, -2, 0>' requested here}}
821
886
max_interleaving_dependent<-1 , 4 , 0 , 1 >(); // expected-note{{in instantiation of function template specialization 'max_interleaving_dependent<-1, 4, 0, 1>' requested here}}
822
- speculated_iterations_dependent<1 , 8 , -3 , 0 >(); // expected-note{{in instantiation of function template specialization 'speculated_iterations_dependent<1, 8, -3, 0>' requested here}}
887
+ speculated_iterations_dependent<1 , 8 , -3 , 0 , 16 >(); // expected-note{{in instantiation of function template specialization 'speculated_iterations_dependent<1, 8, -3, 0, 16 >' requested here}}
823
888
loop_coalesce_dependent<-1 , 4 , 0 >(); // expected-note{{in instantiation of function template specialization 'loop_coalesce_dependent<-1, 4, 0>' requested here}}
824
889
loop_count_control_dependent<3 , 2 , -1 >(); // expected-note{{in instantiation of function template specialization 'loop_count_control_dependent<3, 2, -1>' requested here}}
825
- max_reinvocation_delay_dependent<1 , 3 , 0 >(); // expected-note{{in instantiation of function template specialization 'max_reinvocation_delay_dependent<1, 3, 0>' requested here}}
890
+ max_reinvocation_delay_dependent<1 , 3 , 0 , 6 >(); // expected-note{{in instantiation of function template specialization 'max_reinvocation_delay_dependent<1, 3, 0, 6 >' requested here}}
826
891
check_max_concurrency_expression ();
827
892
check_max_interleaving_expression ();
828
893
check_speculated_iterations_expression ();
0 commit comments