ConvertTruncs is used to replace a trunc for an AND mask, however this function wasn't working as expected. By performing the change later, we can create a wide type integer mask instead of a narrow -1 value, which could then be simply removed (incorrectly). Because we now perform this action later, it's necessary to cache the trunc type before we perform the promotion.
|636 ↗||(On Diff #185039)|
Looks like this isn't checked... that is, if I am not mistaken, the CHECK prefix doesn't occur in the run lines?
I was initially expecting something with an AND here, but the whole point of course is that this gets optimised away? So just nitpicking on this test then.... Perhaps a CHECK udiv, followed by CHECK-NEXT mls to make this explicit, and/or possibly a CHECK-NOT and?