[flang-commits] [flang] [mlir] [RFC][mlir] Conditional support for fast-math attributes. (PR #125620)
lorenzo chelini via flang-commits
flang-commits at lists.llvm.org
Tue Feb 4 05:14:08 PST 2025
================
@@ -225,6 +225,17 @@ def LLVM_FCmpOp : LLVM_ArithmeticCmpOp<"fcmp", [
// Set the $predicate index to -1 to indicate there is no matching operand
// and decrement the following indices.
list<int> llvmArgIndices = [-1, 0, 1, 2];
+
+ let extraClassDeclaration = [{
+ /// Always allow FastmathFlags on llvm.fcmp.
+ /// It does not produce a floating point result, but
+ /// LLVM is currently relying on fast-math flags attached
----------------
chelini wrote:
do you mean that LLVM will look into the compare instead of the select operation for fastMath? Is unclear to me why you are changing this method for the cmpi and not the select.
https://github.com/llvm/llvm-project/pull/125620
More information about the flang-commits
mailing list