mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
nir/search: Fix possible NULL dereference in is_fsign
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Fixes:09705747d7("nir/algebraic: Reassociate fadd into fmul in DPH-like pattern") (cherry picked from commit050e4e28bf)
This commit is contained in:
parent
16af8e9772
commit
e958b35a40
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ is_fsign(nir_alu_instr *instr, unsigned src,
|
|||
if (src_alu->op == nir_op_fneg)
|
||||
src_alu = nir_src_as_alu_instr(src_alu->src[0].src);
|
||||
|
||||
return src_alu->op == nir_op_fsign;
|
||||
return src_alu != NULL && src_alu->op == nir_op_fsign;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue