[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 10:58:18 PST 2025


================
@@ -66,6 +66,12 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) {
   }
 }
 
+bool IntrinsicInst::canAccessFPEnvironment(LLVMContext &C, Intrinsic::ID IID) {
+  AttributeList Attrs = Intrinsic::getAttributes(C, IID);
+  MemoryEffects ME = Attrs.getMemoryEffects();
+  return ME.onlyAccessesInaccessibleMem();
----------------
efriedma-quic wrote:

I think you want doesAccessInaccessibleMem() (any function that can access inaccessible memory, not just functions which only access inaccessible memory). Which apparently doesn't exist at the moment, but should be straightforward to implement.

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


More information about the llvm-commits mailing list