[SimplifyCFG] Don't split musttail call from ret
authorJoseph Tremoulet <jotrem@microsoft.com>
Tue, 2 Apr 2019 15:48:58 +0000 (15:48 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Tue, 2 Apr 2019 15:48:58 +0000 (15:48 +0000)
commitfb4d9f7287c24f16e1916afa8ea58bb8c7f856fc
treef2b021ebe2ff0a6fb4f21b90be74b37e0fb27859
parent6a27c48be223ce25b73eab7a49f4d502cdf24dce
[SimplifyCFG] Don't split musttail call from ret

Summary:
When inserting an `unreachable` after a noreturn call, we must ensure
that it's not a musttail call to avoid breaking the IR invariants for
musttail calls.

Reviewers: fedor.sergeev, majnemer

Reviewed By: majnemer

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60080

llvm-svn: 357485
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/SimplifyCFG/noreturn-call.ll