On Wed, Oct 23, 2013 at 07:22:20PM +0200, Jakub Jelinek wrote: > On Tue, Oct 22, 2013 at 08:27:54PM +0400, Sergey Ostanevich wrote: > > still fails on 403 et al. > > Ok, reproduced, unfortunately the pending stmt sequences already pretty much > assume that they will end up in a single combined basic block. I went > through various alternatives (deferring update_ssa (TODO_update_ssa) call > until after combine_blocks - doesn't work, because it is unhappy about > basic blocks being removed, temporarily putting all the stmts into latch > (doesn't work, because there are no PHIs for it in the loop), so the final > fix as discussed with Richard on IRC is not to predicate_bbs early before > versioning (unless -ftree-loop-if-convert-stores it is easily achievable > by just using a better dominance check for that), or for the stores stuff > doing it and freeing again (at least for now). > > The predicate_bbs stuff would certainly appreciate more TLC in the future. > > Attaching whole new patchset, the above mentioned fix is mostly in the > first patch (which also contains a tree-cfg.h include that is needed for > today's header reshufling), the other two patches are just tweaked to > apply on top of that. All 3 patches together have been > bootstrapped/regtested on x86_64-linux and i686-linux, the first one > and first+second just compile time tested.
BTW, to test the effect of not disabling if-conversion for non-vectorized loops unless there were conditional loads/stores, instead of patching you could just test with additional -ftree-loop-if-convert I guess. Jakub