[TargetLowering] Use SETCC input type to call getBooleanContents instead of the setcc result type.

This isn't a functonal change since we also check the bit width is the
same and the input type is integer. This guarantees the input and
output type are the same. But passing the input type makes the code
more readable.
This commit is contained in:
Craig Topper 2020-01-05 22:54:34 -08:00
parent 8aae6455c0
commit 19ace449a3
1 changed files with 1 additions and 1 deletions

View File

@ -1261,7 +1261,7 @@ bool TargetLowering::SimplifyDemandedBits(
// -1, we may be able to bypass the setcc.
if (DemandedBits.isSignMask() &&
Op0.getScalarValueSizeInBits() == BitWidth &&
getBooleanContents(VT) ==
getBooleanContents(Op0.getValueType()) ==
BooleanContent::ZeroOrNegativeOneBooleanContent) {
// If we're testing X < 0, then this compare isn't needed - just use X!
// FIXME: We're limiting to integer types here, but this should also work