You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The copy is considered to belong to the caller not the callee (for example, readonly functions should not write to byval parameters).
And optimizations do treat it as UB in practice. llvm/llvm-project#64289 is an end-to-end miscompile caused by tailcallelim introducing a write to a readonly byval argument.
The text was updated successfully, but these errors were encountered:
Demo: https://alive2.llvm.org/ce/z/L6zCAg
This behavior makes some sense, since
byval
means the argument is copied, so callers can't see any writes.But, LangRef implies that this is illegal:
And optimizations do treat it as UB in practice. llvm/llvm-project#64289 is an end-to-end miscompile caused by tailcallelim introducing a write to a
readonly byval
argument.The text was updated successfully, but these errors were encountered: