Skip to content
Commit ef7aed3e authored by Daniel Bertalan's avatar Daniel Bertalan
Browse files

[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
parent 6656029a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment