A loop-phi Phi that involves a first order recurrence can be vectorized only if the Previous instruction that feeds Phi from the previous iteration dominates all of Phi's users. This condition is needed to allow introducing instructions that use both Phi and Previous, combine their values, and feed the users of Phi and Previous.
When Phi has users of types different from its own, a mediating Cast instruction that uses Phi may appear above Previous, thereby breaking this condition. This patch tries to sink such a Cast past Previous, provided the users of Cast are dominated by Previous, thereby enabling vectorization of the loop.