This patch updates SCEVExpander::expandWrapPredicate to not create
redundant 'or false, x' instructions. While those are trivially
foldable, they can be easily avoided and hinder code that checks the
size/cost of the generated checks before further folds.
I am planning on look into a few other similar improvements to code
generated by SCEVExpander.
I remember a while ago @lebedev.ri working on doing some trivial folds
like that in IRBuilder itself, but there where concerns that such
changes may subtly break existing code. AFAIK this effort is not active
any longer?
If you wanted, there's also a CreateOr version which takes an arrayref of operands and does this expansion for you.