@@ -571,7 +571,6 @@ void check_initiation_interval_expression() {
571
571
a[i] = 0 ;
572
572
}
573
573
574
- // Template instantiation test coverages for Intel FPGA loop attribute max_concurrency.
575
574
void check_speculated_iterations_expression () {
576
575
int a[10 ];
577
576
// Test that checks expression is not a constant expression.
@@ -604,38 +603,19 @@ void check_loop_coalesce_expression() {
604
603
a[i] = 0 ;
605
604
}
606
605
607
- // Template instantiation test coverages for Intel FPGA loop attribute max_concurrency.
608
606
void check_loop_count_expression () {
609
607
int a[10 ];
610
608
611
609
// Test that checks expression is not a constant expression.
612
- int foo; // expected-note 3{{declared here}}
613
- // expected-error@+2{{expression is not an integral constant expression}}
614
- // expected-note@+1{{read of non-const variable 'foo' is not allowed in a constant expression}}
615
- [[intel::loop_count_avg (foo + 1 )]] for (int i = 0 ; i != 10 ; ++i)
616
- a[i] = 0 ;
617
-
610
+ int foo; // expected-note {{declared here}}
618
611
// expected-error@+2{{expression is not an integral constant expression}}
619
612
// expected-note@+1{{read of non-const variable 'foo' is not allowed in a constant expression}}
620
613
[[intel::loop_count_max (foo + 1 )]] for (int i = 0 ; i != 10 ; ++i)
621
614
a[i] = 0 ;
622
615
623
- // expected-error@+2{{expression is not an integral constant expression}}
624
- // expected-note@+1{{read of non-const variable 'foo' is not allowed in a constant expression}}
625
- [[intel::loop_count_min (foo + 1 )]] for (int i = 0 ; i != 10 ; ++i)
626
- a[i] = 0 ;
627
-
628
616
// Test that checks expression is a constant expression.
629
617
constexpr int bar = 0 ;
630
- [[intel::loop_count_avg (bar + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
631
- a[i] = 0 ;
632
-
633
- constexpr int bar1 = 0 ;
634
- [[intel::loop_count_max (bar1 + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
635
- a[i] = 0 ;
636
-
637
- constexpr int bar2 = 0 ;
638
- [[intel::loop_count_min (bar2 + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
618
+ [[intel::loop_count_max (bar + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
639
619
a[i] = 0 ;
640
620
}
641
621
0 commit comments