nvir: add constant folding for OP_PERMT
authorBen Skeggs <bskeggs@redhat.com>
Sat, 6 Jun 2020 23:52:00 +0000 (09:52 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 10 Jun 2020 22:52:41 +0000 (22:52 +0000)
commit7dbb7572e2b5b96a9cc7767c7cbf550180ec78cd
treeb3c0bbc297f3eef545643bc8da542311e5fa4ca1
parenta831967c72c57abca347396403fa59d232845282
nvir: add constant folding for OP_PERMT

Important for SM70 INSBF/EXTBF lowering, as these can can often be
eliminated completely.

v2:
- skip CF when subOp is set

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp