nir/builder: Simplify nir_ssa_undef a bit
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 25 Mar 2016 17:43:17 +0000 (10:43 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 25 Mar 2016 21:04:05 +0000 (14:04 -0700)
src/compiler/nir/nir_builder.h

index 22646f7afb4c9053d2ddae43fd9b65d365f55471..3dc7c25ec28052a59c7a9a5351eddec7eaf0664a 100644 (file)
@@ -83,8 +83,7 @@ nir_ssa_undef(nir_builder *build, unsigned num_components, unsigned bit_size)
    if (!undef)
       return NULL;
 
-   nir_instr_insert(nir_before_block(nir_start_block(build->impl)),
-                    &undef->instr);
+   nir_instr_insert(nir_before_cf_list(&build->impl->body), &undef->instr);
 
    return &undef->def;
 }