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:
Juha-Pekka Heikkila
2014-04-07 14:37:42 +03:00
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;
}