summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 72888091950..1c39f050f50 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -851,7 +851,7 @@ static void ComputeSignedMinMaxValuesFromKnownBits(const Type *Ty,
Min = KnownOne;
Max = KnownOne|UnknownBits;
- if ((SignBit & UnknownBits) != 0) { // Sign bit is unknown
+ if (UnknownBits[BitWidth-1]) { // Sign bit is unknown
Min |= SignBit;
Max &= ~SignBit;
}
OpenPOWER on IntegriCloud