scalarizeBinop currently folds
vec_bo((inselt VecC0, V0, Index), (inselt VecC1, V1, Index)) -> inselt(vec_bo(VecC0, VecC1), scl_bo(V0,V1), Index)
This patch extends this to account for cases where one of the vec_bo operands is already all-constant and performs similar cost checks to determine if the scalar binop with a constant still makes sense:
vec_bo((inselt VecC0, V0, Index), VecC1) -> inselt(vec_bo(VecC0, VecC1), scl_bo(V0,extractelt(V1,Index)), Index)
@spatel Have you any suggestions on specific test coverage you'd expect? So far I've just added the PR42174 test case (would you prefer this in pr42174.ll?) and haven't pre-committed the test case until I've got some initial feedback.
Fixes PR42174
its -> it is