[llvm] [NFC][LLVM] Refactor rounding mode detection of constrained fp intrinsic IDs (PR #90854)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 09:19:57 PDT 2024


================
@@ -1491,7 +1491,19 @@ bool Intrinsic::isConstrainedFPIntrinsic(ID QID) {
 #define INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC)                         \
   case Intrinsic::INTRINSIC:
 #include "llvm/IR/ConstrainedOps.def"
+#undef INSTRUCTION
     return true;
+  default:
+    return false;
+  }
+}
+
+bool Intrinsic::hasConstrainedFPRoundingModeOperand(Intrinsic::ID QID) {
----------------
arsenm wrote:

I think the whole approach of having dedicated strict intrinsics with dedicated operands is a mistake, see https://discourse.llvm.org/t/thought-on-strictfp-support/71453/9

I think these would be better as some kind of optional tag on call or an operand bundle or something 

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


More information about the llvm-commits mailing list