isl_mat_variable_compression: only set *T2 to NULL on error
When isl_mat_variable_compression figures out that the input equalities
do not allow for any integer solutions, it returns a zero-column matrix
and clears the inverse transformation, assigning it the value NULL.
The inverse transformation is useless in such cases, but some callers
of isl_mat_variable_compression treat a NULL value for the inverse
transformation as an error. This happens in particular in
isl_basic_map_reduce_coefficients and also in normalize_divs in
isl_map_simplify.c. This can result in a spurious coalesce operation
failure. The other callers test for a zero-column transformation first,
but free the returned inverse transformation anyway.
Since the inverse transformation cannot be used in case of a zero-column
transformation, it would not hurt to simply return the current value
of the inverse transformation, whatever it is.
Still, it seems cleaner to return a matching zero-row matrix instead,
which is what this commit does.
Reported-by: antoine.morvan.pro@gmail.com
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>