Move code from SCF to Affine: Add a new helper function simplifyConstrainedMinMaxOp to Affine/Analysis/Utils.h. canonicalizeMinMaxOp was originally designed for loop peeling, but it is not SCF-specific and can be used to simplify any affine.min/max ops.
Various functions in SCF/Transforms are simplified by dropping unnecessary parameters.