[CGP] In optimizeMemoryInst handle select similarly to phi
authorJohn Brawn <john.brawn@arm.com>
Tue, 3 Oct 2017 13:04:15 +0000 (13:04 +0000)
committerJohn Brawn <john.brawn@arm.com>
Tue, 3 Oct 2017 13:04:15 +0000 (13:04 +0000)
commiteb83c7554e5eee2b0c4c145050a0da901c25e4bb
tree53a395f9f0776d6403d24bee05cb326392f50453
parent68aa7de5172002935b14549aedeb7310b0b715e5
[CGP] In optimizeMemoryInst handle select similarly to phi

This lets us optimize away selects that perform the same address computation in
two different ways and is also the first step towards being able to handle
selects between two different, but compatible, address computations.

Differential Revision: https://reviews.llvm.org/D38242

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