[llvm] [IR] Store fast-math flags in subclasses of Instruction (PR #191190)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 01:09:07 PDT 2026
================
@@ -51,6 +51,15 @@ namespace Intrinsic {
typedef unsigned ID;
}
+/// Provide fast-math flags storage, instructions that support fast-math flags
+/// should inherit from this class.
+class FastMathFlagsStorage {
+ friend class FPMathOperator;
+
+protected:
+ unsigned short FMFValue = 0;
----------------
aengelke wrote:
Probably should be an enum type. Why not FastMathFlags? In any case, we shouldn't hard-code unsigned short everywhere.
https://github.com/llvm/llvm-project/pull/191190
More information about the llvm-commits
mailing list