nv50/ir: pre-compute BFE arg when both bits and offset are imm
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 21 Aug 2015 02:13:48 +0000 (22:13 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 21 Aug 2015 02:16:46 +0000 (22:16 -0400)
commit8483577f6b393c26dc21f6693e44760404ba6fcb
tree14e34ccdd6a7c340dcb2e722fb21b3a6ec67daf1
parentecebd3dbfcb769b44e99733279c8fb0745818708
nv50/ir: pre-compute BFE arg when both bits and offset are imm

Due to a quirk in how the nv50 opt passes run, the algebraic
optimization that looks for these BFE's happens before the constant
folding pass. Rearranging these passes isn't a great idea, but this is
easy enough to fix. Allows a following cvt to eliminate the bfe in
certain situations.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp