LSR should avoid redundant edge splitting.
authorAndrew Trick <atrick@apple.com>
Tue, 4 Oct 2011 03:50:44 +0000 (03:50 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 4 Oct 2011 03:50:44 +0000 (03:50 +0000)
commitf143b79b78d1d244809fa59320f2af2edf4e1a86
treed98851fb9036648d18eeb33137346849071a4847
parent2aeb8027d649320d5ad3a30d9bbeb71c783b50d4
LSR should avoid redundant edge splitting.

This handles the case in which LSR rewrites an IV user that is a phi and
splits critical edges originating from a switch.
Fixes <rdar://problem/6453893> LSR is not splitting edges "nicely"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141059 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/BasicBlockUtils.h
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
test/Transforms/LoopStrengthReduce/2011-10-03-CritEdgeMerge.ll [new file with mode: 0644]