The cast simplifications that instcombine does here do not make any
attempt to obey the verifier rules for musttail calls. Therefore we have
to disable them.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
4011 ↗ | (On Diff #140687) | Why does it matter whether the function is a thunk? It seems like this would be a problem for any musttail call. |
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
4011 ↗ | (On Diff #140687) | That's true. I can imagine LTO situations where this would go wrong without any variadic argument pack forwarding being involved. |
Comment Actions
LGTM with one minor change.
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
4012 ↗ | (On Diff #140699) | CS.isMustTailCall(). |
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
4012 ↗ | (On Diff #140699) | Thanks! |