3.6.1 patch nomination: r232189 - [SCEV] Fix PR22856

Sanjoy Das sanjoy at playingwithpointers.com
Fri Mar 13 13:36:46 PDT 2015


This change fixes https://llvm.org/bugs/show_bug.cgi?id=22856.

Commit message:

Summary:
ScalarEvolutionExpander assumes that the header block of a loop is a
legal place to have a use for a phi node.  This is true only for phis
that are either in the header or dominate the header block, but it is
not true for phi nodes that are strictly internal to the loop body.

This change teaches ScalarEvolutionExpander to place uses of PHI nodes
in the basic block the PHI nodes belong to.  This is always legal, and
`hoistIVInc` ensures that the said position dominates `IsomorphicInc`.

Reviewers: atrick

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8311



More information about the llvm-commits mailing list