isScalarWithPredication assumes that the decision for 'foldTailByMasking'
is already calculated, which may not be true at the point of asking the
question. By passing 'VFIterationIsPredicated' as a separate operand, we can
make this dependency explicit, and use this function earlier on before
it has been finally decided whether tail predication will be used.
This patch also renames isPredicatedInst -> requiresPredication, to avoid
the suggestion that the function only returns true if the instruction
was predicated in the original loop.
could you try to make this function const? You'd probably need to propagate it to blockNeedsPredication and a few other places, but it'd be worth it.