radeonsi: force NaNs to 0
[mesa.git] / src / gallium / drivers / llvmpipe / lp_test_conv.c
index e2ec6e2bb45b6e33cc5b8d4d2bf33e3cce187e97..8290da4004bf40ebd4d55d3ca4b6f24f3332d67e 100644 (file)
@@ -211,7 +211,7 @@ test_one(unsigned verbose,
 
    eps = MAX2(lp_const_eps(src_type), lp_const_eps(dst_type));
 
-   gallivm = gallivm_create();
+   gallivm = gallivm_create("test_module", LLVMGetGlobalContext());
 
    func = add_conv_test(gallivm, src_type, num_srcs, dst_type, num_dsts);
 
@@ -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;