[DA] Remove `DependenceInfo::unifySubscriptType` (#181607)
`DependenceInfo::unifySubscriptType` is a function that takes two
subscripts and casts them to the wider type. Using this function can
sometimes lead to correctness issues, especially when combined with
`DependenceInfo::removeMatchingExtensions`, as in #148435. These two
functions are intended to broaden the scope of DA, but they can also
introduce correctness issues, mainly due to mishandling of `sext`/`zext`
and integer overflows.
To avoid these issues, this patch removes the `unifySubscriptType`
function. Currently, it has only one caller, which is part of the
validation logic for delinearization. Instead of calling
`unifySubscriptType`, this patch adds a type check and bails out if the
types do not match. Note that I'm not entirely sure whether there are
real cases where the types differ and the check is actually necessary.
Also, this patch doesn't include new test cases, as I have not found
concrete examples where `unifySubscriptType` itself causes actual
issues. That is, this patch may be NFC.
Fix #169807