summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2018-04-05 15:29:52 +0000
committerManoj Gupta <manojgupta@google.com>2018-04-05 15:29:52 +0000
commit4b3eefa5e84484da29cd95df8c7c0946a07bc98a (patch)
treeb9b9adaa2d1faaf6a833980e332eff530cebca32 /clang/lib/AST/ExprConstant.cpp
parentbbf98aea83f725f59afcb5bdb4c4dec0b3a0f587 (diff)
downloadbcm5719-llvm-4b3eefa5e84484da29cd95df8c7c0946a07bc98a.tar.gz
bcm5719-llvm-4b3eefa5e84484da29cd95df8c7c0946a07bc98a.zip
Disable -fmerge-all-constants as default.
Summary: "-fmerge-all-constants" is a non-conforming optimization and should not be the default. It is also causing miscompiles when building Linux Kernel (https://lkml.org/lkml/2018/3/20/872). Fixes PR18538. Reviewers: rjmccall, rsmith, chandlerc Reviewed By: rsmith, chandlerc Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D45289 llvm-svn: 329300
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 6de55f10dc5..4725b1b5694 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -8596,9 +8596,6 @@ bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {
(LHSValue.Base && isZeroSized(RHSValue)))
return Error(E);
// Pointers with different bases cannot represent the same object.
- // (Note that clang defaults to -fmerge-all-constants, which can
- // lead to inconsistent results for comparisons involving the address
- // of a constant; this generally doesn't matter in practice.)
return Success(E->getOpcode() == BO_NE, E);
}
OpenPOWER on IntegriCloud