summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-03 14:25:46 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-03 14:25:46 +0000
commit10754abe7eecb0aec4627da386e04d7d6d06d56f (patch)
tree690e42a130c89b6ad059354c780bfa40db0ac4c1 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent4438bf749874c933c37b564ceb75581e9352ed5f (diff)
downloadbcm5719-llvm-10754abe7eecb0aec4627da386e04d7d6d06d56f.tar.gz
bcm5719-llvm-10754abe7eecb0aec4627da386e04d7d6d06d56f.zip
Use APInt::getOneBitSet instead of APInt::getBitsSet for sign bit mask creation
Avoids all the unnecessary extra bitrange creation/shift stages. llvm-svn: 296871
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 52551e7833c..8ac41197b62 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7702,7 +7702,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
}
// fold (sext_in_reg x) -> (zext_in_reg x) if the sign bit is known zero.
- if (DAG.MaskedValueIsZero(N0, APInt::getBitsSet(VTBits, EVTBits-1, EVTBits)))
+ if (DAG.MaskedValueIsZero(N0, APInt::getOneBitSet(VTBits, EVTBits - 1)))
return DAG.getZeroExtendInReg(N0, SDLoc(N), EVT.getScalarType());
// fold operands of sext_in_reg based on knowledge that the top bits are not
OpenPOWER on IntegriCloud