gallium: Require LLVM >= 3.8

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
Adam Jackson 2019-09-06 09:50:27 +02:00 committed by Adam Jackson
parent 59f18f2159
commit 585d095610
4 changed files with 5 additions and 9 deletions

View File

@ -95,10 +95,8 @@ MESA_ENABLE_LLVM := true
endif
define mesa-build-with-llvm
$(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5), \
$(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6), \
$(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \
$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"3.7\")) \
$(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"3.8\")) \
$(if $(filter 8,$(MESA_ANDROID_MAJOR_VERSION)), \

View File

@ -1264,7 +1264,7 @@ elif with_gallium_swr
elif with_gallium_opencl or with_gallium_r600
_llvm_version = '>= 3.9.0'
else
_llvm_version = '>= 3.7.0'
_llvm_version = '>= 3.8.0'
endif
_shared_llvm = get_option('shared-llvm')

View File

@ -37,7 +37,7 @@ import SCons.Errors
import SCons.Util
required_llvm_version = '3.7'
required_llvm_version = '3.8'
def generate(env):

View File

@ -318,16 +318,14 @@ lp_build_select(struct lp_build_context *bld,
mask = LLVMBuildTrunc(builder, mask, LLVMInt1TypeInContext(lc), "");
res = LLVMBuildSelect(builder, mask, a, b, "");
}
else if (!(LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR == 7) &&
(LLVMIsConstant(mask) ||
LLVMGetInstructionOpcode(mask) == LLVMSExt)) {
else if (LLVMIsConstant(mask) ||
LLVMGetInstructionOpcode(mask) == LLVMSExt) {
/* Generate a vector select.
*
* Using vector selects should avoid emitting intrinsics hence avoid
* hindering optimization passes, but vector selects weren't properly
* supported yet for a long time, and LLVM will generate poor code when
* the mask is not the result of a comparison.
* Also, llvm 3.7 may miscompile them (bug 94972).
* XXX: Even if the instruction was an SExt, this may still produce
* terrible code. Try piglit stencil-twoside.
*/