Verifier: Don't reject varargs callee cleanup functions
authorReid Kleckner <reid@kleckner.net>
Fri, 29 Aug 2014 21:25:28 +0000 (21:25 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 29 Aug 2014 21:25:28 +0000 (21:25 +0000)
commitdae28732f44add82857b7a802b7985b93aaf054e
treed1e6fd241f95c3e9947eed037e3fcd0a9023ab3c
parent6393b3a6777f9f64ce3041ed3302da4e22d1091b
Verifier: Don't reject varargs callee cleanup functions

We've rejected these kinds of functions since r28405 in 2006 because
it's impossible to lower the return of a callee cleanup varargs
function. However there are lots of legal ways to leave such a function
without returning, such as aborting. Today we can leave a function with
a musttail call to another function with the correct prototype, and
everything works out.

I'm removing the verifier check declaring that a normal return from such
a function is UB.

Reviewed By: nlewycky

Differential Revision: http://reviews.llvm.org/D5059

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216779 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vararg-callee-cleanup.ll [new file with mode: 0644]
test/Verifier/musttail-valid.ll