nir/algebraic: Be more careful converting ushr to extract_u8/16
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Aug 2018 20:10:22 +0000 (15:10 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 29 Aug 2018 19:04:02 +0000 (14:04 -0500)
commit116b47fe3c0395e95b67c6bd3506ab7d6a83393e
tree1a2abf937d783ae05296afb06d6693262cf19dab
parent40fc4b5acd65b4dcc1f216e605fc84eff695ff4a
nir/algebraic: Be more careful converting ushr to extract_u8/16

If it's not the right bit-size, it may not actually be the correct
extraction.  For now, we'll only worry about 32-bit versions.

Fixes: 905ff8619824 "nir: Recognize open-coded extract_u16"
Fixes: 76289fbfa84a "nir: Recognize open-coded extract_u8"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_opt_algebraic.py