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 af16676b822056084c8b42630dcac53ef9dcf5d6..91bb2f7dfeb1c043d9fbc81f722a7dff35c118d6 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;
 }