The folding rule (select C, (gep Ptr, Idx), Ptr) -> (gep Ptr, (select C, Idx, 0)) creates a malformed select if C is a vector while Idx is scalar.
SELECT VecC, ScalarIdx, 0
We could splat Idx to a vector but it defeats the purpose of optimisation. Don't apply the folding rule in this case.
This fixes a regression from commit d561b6fbdbe6d1da05fd92003a4ac1e37bf4b8bc.
newline