This patch updates the cost models for loop unrolling to discount the cost of a loop invariant expression on all but one iteration. The reasoning here is that such an expression (as determined by SCEV) will be CSEd once the loop is unrolled. Note that SCEVs reasoning will find things which can be invariant, not simply those outside the loop.
Note that unrolling currently has two cost models. One very very simple for partial and runtime unrolling, one much more complicated for full unrolling. The second was already handled, this case is the former.
Typo