[SimplifyCFG] Add a workaround to fix PR30188
authorJames Molloy <james.molloy@arm.com>
Fri, 2 Sep 2016 07:29:00 +0000 (07:29 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 2 Sep 2016 07:29:00 +0000 (07:29 +0000)
commitf3cf2a494be6aeb52ee323a2f30c63d212afbd5b
treea38d7d3dbc8483967b7373820bbaa06601dd26f8
parent3121ddf7fabef34e6876fc46dc243b125dd31b8e
[SimplifyCFG] Add a workaround to fix PR30188

We're sinking stores, which is a good thing, but in the process creating selects for the store address operand, which SROA/Mem2Reg can't look through, which caused serious regressions.

The real fix is in SROA, which I'll be looking into.

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