From d3fddf63ec9e3a70f3d8c5a98794d70a234417f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 22 Jun 2021 00:10:19 -0400 Subject: [PATCH] ac/llvm: don't set skip-uniform-regions to fix atomic.cmpswap This fixes SSBO atomic cmpswap tests and transform feedback order piglit tests. Fixes: 3bb65c06706 - ac: force enable -structurizecfg-skip-uniform-regions for LLVM 11 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3884 Reviewed-by: Pierre-Eric Pelloux-Prayer Acked-by: Samuel Pitoiset Part-of: --- src/amd/llvm/ac_llvm_util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/llvm/ac_llvm_util.c b/src/amd/llvm/ac_llvm_util.c index e285c304471..fd7895be72b 100644 --- a/src/amd/llvm/ac_llvm_util.c +++ b/src/amd/llvm/ac_llvm_util.c @@ -68,7 +68,10 @@ static void ac_init_llvm_target(void) "-simplifycfg-sink-common=false", "-global-isel-abort=2", "-amdgpu-atomic-optimizations=true", +#if LLVM_VERSION_MAJOR == 11 + /* This fixes variable indexing on LLVM 11. It also breaks atomic.cmpswap on LLVM >= 12. */ "-structurizecfg-skip-uniform-regions", +#endif }; LLVMParseCommandLineOptions(ARRAY_SIZE(argv), argv, NULL); }