[PATCH] D115737: [IPSCCP] Partial support for constrained intrinsics

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 08:55:51 PST 2021


nikic added inline comments.


================
Comment at: llvm/lib/IR/Instruction.cpp:694
 bool Instruction::isSafeToRemove() const {
+  if (const auto *CI = dyn_cast<ConstrainedFPIntrinsic>(this)) {
+    Optional<fp::ExceptionBehavior> EB = CI->getExceptionBehavior();
----------------
fhahn wrote:
> I think this change is strictly independent of supporting constrained intrinsics in SCCP and should be separate I think.
I think it would be better to address this by switching SCCP to use isInstructionTriviallyDead() instead. In fact, if we switch SCCP and FunctionSpecialization, we can drop this method entirely, as these seem to be the only users. Don't really see why we need a second, worse implementation if this functionality.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115737



More information about the llvm-commits mailing list