summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-04-25 16:30:06 +0100
committerJosé Fonseca <[email protected]>2012-04-25 18:09:38 +0100
commit914244e59d6ad08ec2dd815129c6e75b32843d80 (patch)
tree7601b4de027d1d298488453a8688c8e1e03774aa /src
parent9f4509343369e8adb43268329c845148ea32a114 (diff)
gallivm: Use lp_build_alloca instead of LLVMBuildAlloca on the loop limiter.
To ensure that the alloca is at the top of the function body, otherwise LLVM will not eliminate them, causing stack misalignment on 32bits. Reviewed-by: James Benton <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 8cfcf5df730..cca7ef5f89a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -79,10 +79,7 @@ static void lp_exec_mask_init(struct lp_exec_mask *mask, struct lp_build_context
mask->exec_mask = mask->ret_mask = mask->break_mask = mask->cont_mask = mask->cond_mask =
LLVMConstAllOnes(mask->int_vec_type);
- mask->loop_limiter = LLVMBuildAlloca(
- builder,
- int_type,
- "looplimiter");
+ mask->loop_limiter = lp_build_alloca(bld->gallivm, int_type, "looplimiter");
LLVMBuildStore(
builder,