[CGP] Fix the GV handling in complex addressing mode
authorSerguei Katkov <serguei.katkov@azul.com>
Tue, 23 Jan 2018 12:07:49 +0000 (12:07 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Tue, 23 Jan 2018 12:07:49 +0000 (12:07 +0000)
commit17e5794f11c72ed95a6208191ccc3efedbdd4794
tree500d385e6906cd4f33113c0779ecc0e0c7f28f4f
parentc159aa6aeb56c9e08c7a6b47b97906d1c7634261
[CGP] Fix the GV handling in complex addressing mode

If in complex addressing mode the difference is in GV then
base reg should not be installed because we plan to use
base reg as a merge point of different GVs.

This is a fix for PR35980.

Reviewers: reames, john.brawn, santosh
Reviewed By: john.brawn
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42230

llvm-svn: 323192
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-select.ll