The original change compares APInt to check the constant is the same or not. But shift amount may have different constant types.
So, this patch change to use getZExtValue to compare constant value.
The special case for bit extraction pattern is ((x >> C) & mask) << C.
It can be combined to x & (mask << C) by return true in isDesirableToCommuteWithShift.