[llvm] Remove the optional bitcast between a musttail call and its ret (PR #201280)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 05:52:48 PDT 2026
================
@@ -7132,6 +7132,20 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
}
}
+ // Old bitcode allowed an optional bitcast between a musttail call and the
+ // return. Under opaque pointers that cast is always a no-op, and the
+ // verifier no longer accepts it, so drop it.
+ if (auto *BC = dyn_cast<BitCastInst>(&I);
+ BC && BC->getSrcTy() == BC->getDestTy() &&
+ isa_and_nonnull<ReturnInst>(BC->getNextNode())) {
+ if (auto *CI = dyn_cast<CallInst>(BC->getOperand(0));
----------------
arsenm wrote:
I'd expect this to start at the call, not the bitcast?
https://github.com/llvm/llvm-project/pull/201280
More information about the llvm-commits
mailing list