llvmpipe: Delete unneeded LLVM stuff earlier.
[mesa.git] / src / gallium / drivers / llvmpipe / lp_test_conv.c
index e2ec6e2bb45b6e33cc5b8d4d2bf33e3cce187e97..b7d0bfda4b81c99372cdb332c9676c5258917278 100644 (file)
@@ -219,6 +219,8 @@ test_one(unsigned verbose,
 
    conv_test_ptr = (conv_test_ptr_t)gallivm_jit_function(gallivm, func);
 
+   gallivm_free_ir(gallivm);
+
    success = TRUE;
    for(i = 0; i < n && success; ++i) {
       unsigned src_stride = src_type.length*src_type.width/8;
@@ -319,8 +321,6 @@ test_one(unsigned verbose,
    if(fp)
       write_tsv_row(fp, src_type, dst_type, cycles_avg, success);
 
-   gallivm_free_function(gallivm, func, conv_test_ptr);
-
    gallivm_destroy(gallivm);
 
    return success;