================ @@ -2827,6 +2827,14 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { })) return nullptr; break; + case Intrinsic::experimental_hot: { + // The intrinsic declaration includes sideeffects to avoid it moved. This + // prevents removing even if the intrinsic is unused. We should remove + // unused ones to enabled other optimizations. + if (CI.use_empty()) + return eraseInstFromFunction(CI); ---------------- nikic wrote:
This should be handled inside wouldInstructionBeTriviallyDead. https://github.com/llvm/llvm-project/pull/84851 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits