Revert "ac: generate FMA for inexact instructions for radeonsi"
[mesa.git] / src / amd / llvm / ac_llvm_helper.cpp
index 1174b34b638383258f8a932d4bbeab2469318675..10cf301131a7d19eb19b9e7e74b3c4497e99fa36 100644 (file)
@@ -114,11 +114,6 @@ LLVMBuilderRef ac_create_builder(LLVMContextRef ctx,
                 */
                flags.setAllowReciprocal(); /* arcp */
 
-               /* Allow floating-point contraction (e.g. fusing a multiply
-                * followed by an addition into a fused multiply-and-add).
-                */
-               flags.setAllowContract(); /* contract */
-
                llvm::unwrap(builder)->setFastMathFlags(flags);
                break;
        }
@@ -126,32 +121,6 @@ LLVMBuilderRef ac_create_builder(LLVMContextRef ctx,
        return builder;
 }
 
-/* Return the original state of inexact math. */
-bool ac_disable_inexact_math(LLVMBuilderRef builder)
-{
-       auto *b = llvm::unwrap(builder);
-       llvm::FastMathFlags flags = b->getFastMathFlags();
-
-       if (!flags.allowContract())
-               return false;
-
-       flags.setAllowContract(false);
-       b->setFastMathFlags(flags);
-       return true;
-}
-
-void ac_restore_inexact_math(LLVMBuilderRef builder, bool value)
-{
-       auto *b = llvm::unwrap(builder);
-       llvm::FastMathFlags flags = b->getFastMathFlags();
-
-       if (flags.allowContract() == value)
-               return;
-
-       flags.setAllowContract(value);
-       b->setFastMathFlags(flags);
-}
-
 LLVMTargetLibraryInfoRef
 ac_create_target_library_info(const char *triple)
 {