[InstCombine] try to narrow min/max intrinsics with constant operand
The constant trunc/ext may not be the optimal pre-condition, but I think that handles the common cases. Example of Alive2 proof: https://alive2.llvm.org/ce/z/sREeLC This is another step towards canonicalizing to the intrinsics. Narrowing was identified as source of potential regression for abs(), so we need to handle this for min/max - see: https://llvm.org/PR48816 If this is not enough, we could process intrinsics in the trunc-driven matching in canEvaluateTruncated().
Loading
Please sign in to comment