On Sat, 7 Jun 2014, Eric Botcazou wrote: > > The following adds the missing capability to sink loads to > > tree-ssa-sink.c. This enables sinking of loads and dependent > > expressions into code paths that uses them (thus performing > > partial dead code elimination on loads). > > There is a much heavier implementation in tree-ssa-loop-im.c attached to PR > tree-opt/57186 as well as 3 testcases. > > > The algorithm is simple (similar to that sinking stores) to > > be light-weight on compile-time thus it may miss some > > opportunities but it fires quite a bit on GCC itself. > > Is it sufficient for the aforementioned testcases?
It fixes testcase #1 and #2 but not #3 (needs store motion first, but sinking runs before store motion - and sinking doesn't really apply to store motion opportunities). I'll add the first two testcases to the testsuite. Thanks, Richard.