OSDN Git Service

[ScalarEvolutionExpander] Properly insert no-op casts + EH Pads
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 27 Oct 2015 07:36:42 +0000 (07:36 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 27 Oct 2015 07:36:42 +0000 (07:36 +0000)
commit1089dfcf5c7b5ac67b17b4586f88a01644192d60
treeb2570341cab9a544c68105f107da84b53ca6b543
parent684557ee8c2679d846526d6fb2b40121ff68ce0a
[ScalarEvolutionExpander] Properly insert no-op casts + EH Pads

We want to insert no-op casts as close as possible to the def.  This is
tricky when the cast is of a PHI node and the BasicBlocks between the
def and the use cannot hold any instructions.  Iteratively walk EH pads
until we hit a non-EH pad.

This fixes PR25326.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251393 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolutionExpander.cpp
test/Transforms/LoopStrengthReduce/funclet.ll [new file with mode: 0644]