[InstCombine] Do not fold 'and (sext (ashr X, Shift)), C' if Shift < 0
The 'and (sext (ashr X, ShiftC)), C' --> 'lshr (sext X), ShiftC' transformation would access out of bounds bits in APInt::getLowBitsSet if the shift count was larger than X's bit width or if it was negative. Fixes #56424
Loading
Please sign in to comment