summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2020-01-05 22:54:34 -0800
committerCraig Topper <craig.topper@gmail.com>2020-01-05 23:15:49 -0800
commit19ace449a3da4058428495283b3b15826f8d7d34 (patch)
treeef78fe903f5cd5c356232b06e9221f85325cc77f /llvm/lib/CodeGen
parent8aae6455c074af5ad9a2fe4e68079cfc591359ab (diff)
downloadbcm5719-llvm-19ace449a3da4058428495283b3b15826f8d7d34.tar.gz
bcm5719-llvm-19ace449a3da4058428495283b3b15826f8d7d34.zip
[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.
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index f6e96d22c77..21c8bde4364 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -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
OpenPOWER on IntegriCloud