[Mesa-dev] [PATCH] gallivm: obey clarified shift behavior

Jose Fonseca jfonseca at vmware.com
Wed Jul 31 02:48:25 PDT 2013



----- Original Message -----
> > From: Roland Scheidegger <sroland at vmware.com>
> > 
> > llvm shifts are undefined for shift counts exceeding (or matching) bit
> > width,
> > so need to apply a mask for the tgsi shift instructions.
> > 
> > v2: only use mask for the tgsi shift instructions, not for the build shift
> > helpers. None of the internal callers need this behavior, and while llvm
> > can
> > optimize away the masking for constants there are legitimate cases where it
> > might not be able to do so even if we know that shift count must be smaller
> > than type width (currently all such callers do not use the build shift
> > helpers).
> 
> Looks good to me
> 

Same here. Thanks for the update.

Jose


More information about the mesa-dev mailing list