The revision introduces a affine.min and affine.max canonicalization pattern that orders the result expressions. It flattens the result expressions to arrays of dimension and symbol coefficients plus one constant coefficient and rearranges them in lexicographic order.
Without the pattern, CSE will not eliminate two affine.min / affine.max operation if the results are ordered differently. For example, the operations
%1 = affine.min affine_map<(d0) -> (8, -d0 + 27)>(%arg4) %2 = affine.min affine_map<(d0) -> (-d0 + 27, 8)>(%arg4)
doe not CSE. After applying the pattern, the two operations are equivalent
%1 = affine.min affine_map<(d0) -> (8, -d0 + 27)>(%arg4) %2 = affine.min affine_map<(d0) -> (8, -d0 + 27)>(%arg4)
which enables CSE.
Nit: Missing operands; op is ill-formed.