This patch teaches loop vectorizer to vectorize phi nodes that have the
following characteristics:
- header phis that are not identified as induction/reduction/first order
recurrences.
- feeds in from a phi in the latch block and that phi can be if-converted
- unused outside the loop.
Condition #3 will be avoided in a follow on change.
This is to teach the vectorizer about general recurrences and cross iteration
dependencies.
The key point here is that if the header phi feeds from an if-convertable phi,
then the header phi can be vectorized. The 'resume' value extracted for this
header phi in the scalar post loop is the last element of the vectorized phi in
the latch block.
Please see added test cases. A current TODO item is we do not want to vectorize
'dead' loops, i.e. a read only loop whose values computed in the loop have no
outside users.
Please note: I will add more test cases, this is a proof of concept patch just
to make sure I've not missed some obvious legality constraint.