diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-01-24 20:23:48 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-01-24 20:23:48 +0000 |
| commit | a096e0bdf6cfa020569afca490d8e4c9ac8ebb01 (patch) | |
| tree | 39ef21ba905e021d44b9a5fb47336d4a864da27e /lib/CodeGen/CodeGenPrepare.cpp | |
| parent | d215fd3b74b90f5dc1964610926fcc2a20f959aa (diff) | |
Diffstat (limited to 'lib/CodeGen/CodeGenPrepare.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenPrepare.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |
