glsl: Fix type error when lowering integer divisions
glsl: Fix type error when lowering integer divisions

This patch fixes a bug when lowering an integer division:

  x/y

to a multiplication by a reciprocal:

  int(float(x)*reciprocal(float(y)))

If x was a plain int and y was an ivecN, the lowering pass
incorrectly assigned the type of the product to be float, when in fact
it should be vecN.  This caused mesa to abort with an IR validation
error.

Fixes piglit tests {fs,vs}-op-div-int-ivec{2,3,4}.

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

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