svn commit: r327734 - projects/clang600-import/contrib/llvm/lib/CodeGen
Dimitry Andric
dim at FreeBSD.org
Tue Jan 9 17:41:36 UTC 2018
Author: dim
Date: Tue Jan 9 17:41:34 2018
New Revision: 327734
URL: https://svnweb.freebsd.org/changeset/base/327734
Log:
Pull in r322056 from upstream llvm trunk (by Serguei Katkov):
[CGP] Fix Complex addressing mode for offset
If the offset is differ in two addressing mode we can continue only
if ScaleReg is not set due to we will use it as merge of different
offsets.
It should fix PR35799 and PR35805.
Reviewers: john.brawn, reames
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41227
This should fix "ScaledReg == nullptr" assertions when building the
graphics/xpx, mail/alpine and editors/pico-alpine ports.
Reported by: jbeich
PR: 224866, 224995
Modified:
projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp
Modified: projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp
==============================================================================
--- projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Tue Jan 9 17:38:43 2018 (r327733)
+++ projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Tue Jan 9 17:41:34 2018 (r327734)
@@ -2700,8 +2700,13 @@ class AddressingModeCombiner { (public)
// we still need to collect it due to original value is different.
// And later we will need all original values as anchors during
// finding the common Phi node.
+ // We also must reject the case when base offset is different and
+ // scale reg is not null, we cannot handle this case due to merge of
+ // different offsets will be used as ScaleReg.
if (DifferentField != ExtAddrMode::MultipleFields &&
- DifferentField != ExtAddrMode::ScaleField) {
+ DifferentField != ExtAddrMode::ScaleField &&
+ (DifferentField != ExtAddrMode::BaseOffsField ||
+ !NewAddrMode.ScaledReg)) {
AddrModes.emplace_back(NewAddrMode);
return true;
}
More information about the svn-src-projects
mailing list