From: Samuel Pitoiset Date: Mon, 15 Jan 2018 13:51:45 +0000 (+0100) Subject: ac: set no-signed-zeros-fp-math when RADV_DEBUG="unsafemath" is used X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05f73b96721518314729e49b7cadfb2d915a9ff5;p=mesa.git ac: set no-signed-zeros-fp-math when RADV_DEBUG="unsafemath" is used This is an optimisation that is recommended by Matt Arsenault, and used by RadeonSI, but it's not compatible with Vulkan. Note that AC_FLOAT_MODE_UNSAFE_FP_MATH includes the no signed zeros flag in LLVM. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 635a74d2430..5a8ddf13d7b 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -352,6 +352,9 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module, LLVMAddTargetDependentFunctionAttr(main_function, "unsafe-fp-math", "true"); + LLVMAddTargetDependentFunctionAttr(main_function, + "no-signed-zeros-fp-math", + "true"); } return main_function; }