summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-04-07 11:49:33 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-04-07 11:49:33 +0000
commit561ba386233628f6ef6e114e971d486a0a8bedba (patch)
tree76aacb2c40e3ad17e8f398fc6c898cf0249d11e3 /llvm/lib
parent07adb6abdadfed379a9998e53beb82ce1e253b0e (diff)
downloadbcm5719-llvm-561ba386233628f6ef6e114e971d486a0a8bedba.tar.gz
bcm5719-llvm-561ba386233628f6ef6e114e971d486a0a8bedba.zip
[DAG] Pull out ComputeNumSignBits call to make debugging easier. NFCI.
llvm-svn: 357861
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 8796888c7e5..5b89aceb9d4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1130,8 +1130,8 @@ bool TargetLowering::SimplifyDemandedBits(
// If we only care about the highest bit, don't bother shifting right.
if (DemandedBits.isSignMask()) {
- bool AlreadySignExtended =
- TLO.DAG.ComputeNumSignBits(Op0) >= BitWidth - ExVTBits + 1;
+ unsigned NumSignBits = TLO.DAG.ComputeNumSignBits(Op0);
+ bool AlreadySignExtended = NumSignBits >= BitWidth - ExVTBits + 1;
// However if the input is already sign extended we expect the sign
// extension to be dropped altogether later and do not simplify.
if (!AlreadySignExtended) {
OpenPOWER on IntegriCloud