[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 3 12:12:53 PDT 2025
================
@@ -3897,6 +3897,13 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
return;
}
+ // If there is no valid insert point, we won't emit a return.
+ // The insert point could be null if we have already emitted a return
+ // (e.g. if musttail)
+ if (!HaveInsertPoint()) {
----------------
efriedma-quic wrote:
The placement of this check doesn't seem right; probably it should be before we start constructing instructions?
https://github.com/llvm/llvm-project/pull/134282
More information about the cfe-commits
mailing list