[TypePromotion] Fix sext vs zext in promoted constant
As pointed out in #55342, given non-canonical IR with multiple constants, we check the second operand in isSafeWrap, but can promote both with sext. Fix that as suggested by @craig.topper by ensuring we only extend the second constant if multiple are present. Fixes #55342 Differential Revision: https://reviews.llvm.org/D125294
Loading
Please sign in to comment