When we have the following case:
%c = cmp iN %x, a %t = trunc iN %y to iK %sel = select i1 %c, iK %t, iK b
We could possibly match only min/max pattern after looking through cast.
So it is more profitable if widened b constant will be equal a. That is
why extend b using upper bits from a.
Also description for lookTroughCast function was added.
typo: initial - you could just remove that word, and the comment would be better.