i965/fs: Check variable_storage return value in fs_visitor::visit
check variable_storage() found the requested fs_reg. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
committed by
Ville Syrjälä
parent
78a89d6fa0
commit
db081b497e
@@ -155,6 +155,12 @@ void
|
||||
fs_visitor::visit(ir_dereference_variable *ir)
|
||||
{
|
||||
fs_reg *reg = variable_storage(ir->var);
|
||||
|
||||
if (!reg) {
|
||||
fail("Failed to find variable storage for %s\n", ir->var->name);
|
||||
this->result = fs_reg(reg_null_d);
|
||||
return;
|
||||
}
|
||||
this->result = *reg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user