forked from OSchip/llvm-project
[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:
parent
8aae6455c0
commit
19ace449a3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue