From a096e0bdf6cfa020569afca490d8e4c9ac8ebb01 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 24 Jan 2018 20:23:48 +0000 Subject: Vendor import of llvm release_60 branch r323338: https://llvm.org/svn/llvm-project/llvm/branches/release_60@323338 --- lib/CodeGen/CodeGenPrepare.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenPrepare.cpp') diff --git a/lib/CodeGen/CodeGenPrepare.cpp b/lib/CodeGen/CodeGenPrepare.cpp index 9dc1ab4e6bb5..26ca8d4ee88c 100644 --- a/lib/CodeGen/CodeGenPrepare.cpp +++ b/lib/CodeGen/CodeGenPrepare.cpp @@ -2700,8 +2700,13 @@ 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; } -- cgit v1.3