[SimplifyCFG] Update workaround for PR30188 to also include loads
authorJames Molloy <james.molloy@arm.com>
Wed, 7 Sep 2016 08:40:20 +0000 (08:40 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 7 Sep 2016 08:40:20 +0000 (08:40 +0000)
commitec905a62ae26fd3b2064a15e31b9988a8d32589a
tree9d73c434ff1ce7cd76461d4adec25af7890c9c44
parent42431e7ce7e41e8acf0b38465a73bebd6fd63751
[SimplifyCFG] Update workaround for PR30188 to also include loads

I should have realised this the first time around, but if we're avoiding sinking stores where the operands come from allocas so they don't create selects, we also have to do the same for loads because SROA will be just as defective looking at loads of selected addresses as stores.

Fixes PR30188 (again).

llvm-svn: 280792
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/sink-common-code.ll