This patch fixes a crash when a phi with an optimized cast feeds a
first-order recurrence, as discussed in D113183.
There are 2 issues that this patch addresses:
- The recipe for the optimized cast is not recorded.
- fixHeaderPhis assumes the incoming def defines a single VPValue.
If the incoming value is an induction phi recipe, always use the first
defined value, which represents the phi itself.