summaryrefslogtreecommitdiff
path: root/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-20 21:19:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-20 21:19:10 +0000
commitd99dafe2e4a385dd2a6c76da6d8258deb100657b (patch)
treeba60bf957558bd114f25dbff3d4996b5d7a61c82 /lib/IR/ConstantFold.cpp
parent71d5a2540a98c81f5bcaeb48805e0e2881f530ef (diff)
Notes
Diffstat (limited to 'lib/IR/ConstantFold.cpp')
-rw-r--r--lib/IR/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/ConstantFold.cpp b/lib/IR/ConstantFold.cpp
index bba230677ebf..80b117015ede 100644
--- a/lib/IR/ConstantFold.cpp
+++ b/lib/IR/ConstantFold.cpp
@@ -223,7 +223,7 @@ static Constant *ExtractConstantBytes(Constant *C, unsigned ByteStart,
if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
APInt V = CI->getValue();
if (ByteStart)
- V = V.lshr(ByteStart*8);
+ V.lshrInPlace(ByteStart*8);
V = V.trunc(ByteSize*8);
return ConstantInt::get(CI->getContext(), V);
}