mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
msan: Stop stripping the 'tail' modifier off of calls
This probably isn't necessary since msan started to unpoison the return value shadow memory before all calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
816d9c7b72
commit
3b15c970ab
@ -2272,12 +2272,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow only tail calls with the same types, otherwise
|
||||
// we may have a false positive: shadow for a non-void RetVal
|
||||
// will get propagated to a void RetVal.
|
||||
if (Call->isTailCall() && Call->getType() != Call->getParent()->getType())
|
||||
Call->setTailCall(false);
|
||||
|
||||
assert(!isa<IntrinsicInst>(&I) && "intrinsics are handled elsewhere");
|
||||
|
||||
// We are going to insert code that relies on the fact that the callee
|
||||
|
@ -825,3 +825,17 @@ entry:
|
||||
; CHECK: store i64 16, i64* @__msan_va_arg_overflow_size_tls
|
||||
; CHECK: call void (i32, ...)* @VAArgStructFn
|
||||
; CHECK: ret void
|
||||
|
||||
declare i32 @InnerTailCall(i32 %a)
|
||||
|
||||
define void @MismatchedReturnTypeTailCall(i32 %a) {
|
||||
%b = tail call i32 @InnerTailCall(i32 %a)
|
||||
ret void
|
||||
}
|
||||
|
||||
; We used to strip off the 'tail' modifier, but now that we unpoison return slot
|
||||
; shadow before the call, we don't need to anymore.
|
||||
|
||||
; CHECK-LABEL: define void @MismatchedReturnTypeTailCall
|
||||
; CHECK: tail call i32 @InnerTailCall
|
||||
; CHECK: ret void
|
||||
|
Loading…
x
Reference in New Issue
Block a user