Use ComputeMinSignedBits() to ensure the mul source operands at least sign-extend down from the bottom 16 bits.
This will make it easier if/when we try to support handling of source types larger than 32-bits.
N1.getOperand(0).getScalarValueSizeInBits() <= 8))
return SDValue();
- // Sign bits must extend through the upper 17 bits.
- if (DAG.ComputeNumSignBits(N1) < 17 || DAG.ComputeNumSignBits(N0) < 17)
+ // Sign bits must extend down to the lowest i16.
+ if (DAG.ComputeMinSignedBits(N1) > 16 || DAG.ComputeMinSignedBits(N0) > 16)
return SDValue();
// At least one of the elements must be zero in the upper 17 bits, or can be