summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-01-30 11:37:18 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-01-30 11:37:18 +0000
commit94c26be5810e11f705d7de5381f01e54a04941b4 (patch)
tree49da822b9bf66abfc3735ce2ebf66e87c76e4cb0 /clang/lib/CodeGen/CGExprScalar.cpp
parent9d8a335ce066846b1639ca88456ea91bc28c37d9 (diff)
downloadbcm5719-llvm-94c26be5810e11f705d7de5381f01e54a04941b4.tar.gz
bcm5719-llvm-94c26be5810e11f705d7de5381f01e54a04941b4.zip
Revert "r293343 - [ubsan] Sanity-check shift amounts before truncation
(fixes PR27271)" After r293343 clang fails to compile itself with -fsanitize=undefined ( http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/). rdar://30259929 llvm-svn: 293475
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 40d949deceb..1b85c45cd4b 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -2751,8 +2751,8 @@ Value *ScalarExprEmitter::EmitShl(const BinOpInfo &Ops) {
isa<llvm::IntegerType>(Ops.LHS->getType())) {
CodeGenFunction::SanitizerScope SanScope(&CGF);
SmallVector<std::pair<Value *, SanitizerMask>, 2> Checks;
- llvm::Value *WidthMinusOne = GetWidthMinusOneValue(Ops.LHS, Ops.RHS);
- llvm::Value *ValidExponent = Builder.CreateICmpULE(Ops.RHS, WidthMinusOne);
+ llvm::Value *WidthMinusOne = GetWidthMinusOneValue(Ops.LHS, RHS);
+ llvm::Value *ValidExponent = Builder.CreateICmpULE(RHS, WidthMinusOne);
if (SanitizeExponent) {
Checks.push_back(
OpenPOWER on IntegriCloud