nv50/ir: check for origin insn in findOriginForTestWithZero
authorPierre Moreau <pierre.morrow@free.fr>
Sat, 18 Feb 2017 17:51:50 +0000 (18:51 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 9 Mar 2017 11:42:46 +0000 (12:42 +0100)
commit655c395f65b79bc05259d3ee4887f147d94b243c
tree209e1c2d08d4e4f91f1631ec81cd43e52eaab03b
parentd54b4986946c306e7efb91cdc54227dfe3c90895
nv50/ir: check for origin insn in findOriginForTestWithZero

Function arguments do not have an "origin" instruction, causing a
NULL-pointer dereference without this check.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp