From 5c2c633a8d2007206789934214f823ec5b08a435 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 6 Apr 2017 04:02:28 +0000 Subject: [PATCH] foo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299618 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/TargetLowering.cpp | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.50.1