[PATCH] D118426: [InstCombine] Remove side effect of replaced constrained intrinsics

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 17:23:15 PDT 2022


andrew.w.kaylor added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1057
+  if (CI.use_empty() && isa<ConstrainedFPIntrinsic>(CI))
+    if (SimplifyCall(&CI, SQ.getWithInstruction(&CI)))
+      return &CI;
----------------
Relying on SimplifyCall() here to determine whether the call has side effects is still more restrictive than necessary. For example, if the exception behavior argument is not fp::ExceptionBehavior::ebStrict and the call has no users, it can be removed even if the arguments are non-constant or the operation would raise an exception.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118426/new/

https://reviews.llvm.org/D118426



More information about the llvm-commits mailing list