[InstCombine] Fold more intrinsics over selects
Move this handling to a centralized place and extend it to handle saturating add/sub intrinsics. I originally wanted to make this fully generic rather than whitelist based, because this is legal and likely profitable for all speculatable intrinsics. The caveat is that for vector selects, the intrinsic can't perform cross-lane operations like a shuffle or reduction, which we don't really expose as a generic property right now. So for now I'm just extending the list.
Loading
Please sign in to comment