[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:09 PDT 2026


================
@@ -300,3 +300,51 @@ void FastMathFlags::print(raw_ostream &O) const {
       O << " afn";
   }
 }
+
+unsigned short &FPMathOperator::getFMFValue() {
+  auto *V = static_cast<Value *>(this);
+  auto *I = dyn_cast<Instruction>(V);
----------------
aengelke wrote:

cast<>

https://github.com/llvm/llvm-project/pull/191190


More information about the llvm-commits mailing list