[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 07:26:15 PST 2025
================
@@ -66,6 +66,17 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) {
}
}
+bool IntrinsicInst::canAccessFPEnvironment(Intrinsic::ID IID) {
+ switch (IID) {
+#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN) \
+case Intrinsic::INTRINSIC:
+#include "llvm/IR/ConstrainedOps.def"
----------------
spavloff wrote:
Indeed. I changed the implementation to use access to InaccessibleMemory. It is not precise, because this access type is used by other intrinsics too. In future we could add new type of "memory" to represent FP control and status bit and make this check precise.
https://github.com/llvm/llvm-project/pull/122735
More information about the llvm-commits
mailing list