Mesa (main): ac/llvm: don't set skip-uniform-regions to fix atomic.cmpswap
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 22:33:56 UTC 2021
Module: Mesa
Branch: main
Commit: d3fddf63ec9e3a70f3d8c5a98794d70a234417f7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d3fddf63ec9e3a70f3d8c5a98794d70a234417f7
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Jun 22 00:10:19 2021 -0400
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 <pierre-eric.pelloux-prayer at amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11517>
---
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);
}
More information about the mesa-commit
mailing list