Signed-off-by: Tobias Klausmann <tobias.johannes.klausm...@mni.thm.de> --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index 93f7c2a..68b9a6d 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -546,6 +546,16 @@ ConstantFolding::expr(Instruction *i, } break; } + case OP_POPCNT: { + switch (i->dType) { + case TYPE_S32: + case TYPE_U32: + res.data.u32 = util_bitcount(a->data.u32 & b->data.u32); break; + default: + return; + } + break; + } default: return; } -- 1.8.4.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev