From: Craig Topper Date: Thu, 6 Apr 2017 04:02:28 +0000 (+0000) Subject: foo X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c2c633a8d2007206789934214f823ec5b08a435;p=llvm foo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299618 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index d3ccdcd5ffd..753e5281bfc 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -791,6 +791,9 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op, // TODO: Should we check for other forms of sign-bit comparisons? // Examples: X <= -1, X >= 0 } + if (getBooleanContents(Op.getOperand(0).getValueType()) == + BooleanContent::ZeroOrOneBooleanContent && BitWidth > 1) + KnownZero.setBitsFrom(1); break; } case ISD::SHL: