glsl: store read vector in a temp in vec_index_to_cond
glsl: store read vector in a temp in vec_index_to_cond

Vector indexing on matrixes generates several copy of the
constant matrix, for instance vec=mat4[i][j] generates :
vec=mat4[i].x;
vec=(j==1)?mat4[i].y;
vec=(j==2)?mat4[i].z;
vec=(j==3)?mat4[i].w;
In the case of constant matrixes, the mat4[i] expression generates
copy of the 16 elements of the matrix 4 times ; indirect addressing
also prevents some conservative CSE algorithms (like the one in LLVM)
from factoring the mat4[i] expression.
This patch will make the vec_index_to_cond pass generates :
temp = mat4[i];
vec=temp.x;
vec=(j==1)?temp.y;
vec=(j==2)?temp.z;
vec=(j==3)?temp.w;

Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>

tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,jbarczak/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,metora/MesaGLSLCompiler,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer