[Mesa-dev] [PATCH] radeon: remove unnecessary checks

Jan Vesely jan.vesely at rutgers.edu
Tue Jun 14 21:08:45 UTC 2016


On Tue, 2016-06-14 at 22:44 +0200, Jakob Sinclair wrote:
> On 2016-06-14 20:39, Jan Vesely wrote:
> > I really disagree here. The conditions check whether swizzle is
> > between
> > X and W (as in, only X,Y,Z,W are allowed). The fact that X maps to
> > 0 is
> > irrelevant. removing the checks impairs readability of the code
> > because
> > the lower bound is now inferred (by being 0) rather than explicit.
> > 
> > the same comment applies to your v2.
> > 
> > Jan
> 
> Thanks for the input. Now when I think about it again this is
> probably a 
> bad change.
> Didn't think about the lower bound. So this patch should probably not
> be 
> pushed.

It'd still be nice to have them fixed.
those lines produce Wtype-limits ("comparison always false due to
limited range of data types") warnings which are rather useful in other
cases, since type-limits can lead to DCE of useful code with aggressive
optimization.

not sure what the best way to do is, though.

Jan


-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160614/f15b667d/attachment.sig>


More information about the mesa-dev mailing list