llvmpipe: store zero into all alloca'd values
authorKeith Whitwell <keithw@vmware.com>
Thu, 7 Oct 2010 18:49:20 +0000 (19:49 +0100)
committerKeith Whitwell <keithw@vmware.com>
Sat, 9 Oct 2010 10:43:23 +0000 (11:43 +0100)
Fixes slowdown in isosurf with earlier versions of llvm.

src/gallium/auxiliary/gallivm/lp_bld_flow.c

index 5bc9c741a884a6134ac0bdde674fd08dfb213cf2..cd5fbc246382fb1440e90adcfcc65d3127744fe3 100644 (file)
@@ -830,6 +830,7 @@ lp_build_alloca(LLVMBuilderRef builder,
    }
 
    res = LLVMBuildAlloca(first_builder, type, name);
+   LLVMBuildStore(builder, LLVMConstNull(type), res);
 
    LLVMDisposeBuilder(first_builder);