summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-25 20:22:59 +0200
committerMarek Olšák <[email protected]>2016-08-25 21:19:17 +0200
commita491b9e945423a81f785220b85a9b395060952aa (patch)
treefb8436497f6c84aebcd71065886ad6c0facb8d4a /src/gallium/drivers
parentfe91ae06d3ecc2080b61a6bc35867653de0da418 (diff)
radeonsi: don't use allocas for arrays with LLVM 3.8
It crashes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97413
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 71f52fddbd3..4643e6d0ce7 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -559,8 +559,10 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
* FIXME: We shouldn't need to have the non-alloca
* code path for arrays. LLVM should be smart enough to
* promote allocas into registers when profitable.
+ *
+ * LLVM 3.8 crashes with this.
*/
- if (array_size > 16) {
+ if (HAVE_LLVM >= 0x0309 && array_size > 16) {
array_alloca = LLVMBuildAlloca(builder,
LLVMArrayType(bld_base->base.vec_type,
array_size), "array");