Fix: Lowerbounds for transformation coefficients of statements for which all the linearly independent hyperplanes have been found
@@ -2535,10 +2535,9 @@ void add_coeff_constraints_from_scc_clustered_fcg_colouring (PlutoConstraints *c
scc_offset = 0;
for (j=0; j<num_sccs; j++) {
- /* If the Scc's dimesionality is greater than c, then all vertices
+ /* If the Scc's dimesionality is greater less c, then all vertices
* of this scc are coloured. Hence set the lower bound of the
* transformation coefficients of this SCC to zero.*/
-
if (sccs[j].max_dim < c) {
for (i=0; i<sccs[j].size; i++) {
stmt_id = sccs[j].vertices[i];
@@ -2589,6 +2588,17 @@ void add_coeff_constraints_from_fcg_colouring (PlutoConstraints *coeffcst,
stmt_offset = 0;
for (j=0; j<nstmts; j++) {
+ /* If a statements's dimesionality is less than c, then all
+ * dimensions of this statement are coloured. Hence set the
+ * lower bound of the transformation coefficients of this
+ * statement to zero.*/
+ if (stmts[j]->dim_orig < c) {
+ for (k =0; k<stmts[j]->dim_orig; k++) {
+ pluto_constraints_add_lb(coeffcst,npar+1+j*(nvar+1)+k, 1);
+ }
+ stmt_offset += stmts[j]->dim_orig;
+ continue;
+ }
for (k=0; k<nvar; k++) {
if (stmts[j]->is_orig_loop[k] && colour[stmt_offset+k] == c) {
pluto_constraints_add_lb(coeffcst,npar+1+j*(nvar+1)+k, 1);
