[InstCombine] Drop exact flag instead of increasing demanded bits (#70311)
Demanded bit simplification for lshr/ashr will currently demand the low bits if the exact flag is set. This is because these bits must be zero to satisfy the flag. However, this means that our demanded bits simplification is worse for lshr/ashr exact than it is for plain lshr/ashr, which is generally not desirable. Instead, drop the exact flag if a demanded bits simplification of the operand succeeds, which may no longer satisfy the exact flag. This matches what we do for the exact flag on udiv, as well as the nuw/nsw flags on add/sub/mul.
parent
5e07481d
Please register or sign in to comment