nir/lower_returns: Repair SSA after doing return lowering
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Jan 2016 17:24:07 +0000 (09:24 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Jan 2016 17:43:12 +0000 (09:43 -0800)
src/glsl/nir/nir_lower_returns.c

index af16676..91bb2f7 100644 (file)
@@ -224,8 +224,10 @@ nir_lower_returns_impl(nir_function_impl *impl)
 
    bool progress = lower_returns_in_cf_list(&impl->body, &state);
 
-   if (progress)
+   if (progress) {
       nir_metadata_preserve(impl, nir_metadata_none);
+      nir_repair_ssa_impl(impl);
+   }
 
    return progress;
 }