diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-11-08 05:04:07 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-11-08 05:04:07 +0000 |
commit | b2221842231dd55a98ee0b57085eec1e515787c3 (patch) | |
tree | 29d0d24481c8abc54badb738cc3ddfaf99f49811 /llvm/lib | |
parent | bbcc7f61159901719985b189957f560b73a29df6 (diff) | |
download | bcm5719-llvm-b2221842231dd55a98ee0b57085eec1e515787c3.tar.gz bcm5719-llvm-b2221842231dd55a98ee0b57085eec1e515787c3.zip |
[LoopStrengthReduce] Don't bother fixing up PHIs from EH Pad preds
We cannot really insert fixup code into a PHI's predecessor.
This fixes PR25445.
llvm-svn: 252416
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 7a7d0359b17..9351a284c86 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -3132,6 +3132,9 @@ LSRInstance::CollectLoopInvariantFixupsAndFormulae() { PHINode::getIncomingValueNumForOperand(U.getOperandNo())); if (!DT.dominates(L->getHeader(), UseBB)) continue; + // Don't bother if the instruction is in a BB which ends in an EHPad. + if (UseBB->getTerminator()->isEHPad()) + continue; // Ignore uses which are part of other SCEV expressions, to avoid // analyzing them multiple times. if (SE.isSCEVable(UserInst->getType())) { |