[llvm] [LangRef] Disallow accessing byval arguments from tail-called functions (PR #110093)
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 10:06:56 PDT 2024
================
@@ -63,25 +63,6 @@ declare i32 @e1(ptr nocapture byval(%struct.SmallStruct) %in) nounwind
declare i32 @e2(ptr nocapture byval(%struct.LargeStruct) %in) nounwind
declare i32 @e3(ptr nocapture byval(%struct.LargeStruct) align 16 %in) nounwind
-; rdar://12442472
-; We can't do tail call since address of s is passed to the callee and part of
-; s is in caller's local frame.
-define void @f3(ptr nocapture byval(%struct.SmallStruct) %s) nounwind optsize {
-; CHECK-LABEL: f3
-; CHECK: bl _consumestruct
-entry:
- tail call void @consumestruct(ptr %s, i32 80) optsize
----------------
ostannard wrote:
I think it's better to delete them, because the comment above says they are testing something not guaranteed by the LangRef, and with #109943 they will actually be tail-called.
https://github.com/llvm/llvm-project/pull/110093
More information about the llvm-commits
mailing list