[SimplifyCFG] Fold `llvm.guard(false)` to unreachable
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 21 Apr 2016 05:09:12 +0000 (05:09 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 21 Apr 2016 05:09:12 +0000 (05:09 +0000)
commit54a3a006cab5a108322ed61ce4fbe2939177274c
treec4333b4bb38c01709d4f43209437ffb66df22abd
parentafd1b06d8eaaaf15b38a5ad79dcab20f437b1bc0
[SimplifyCFG] Fold `llvm.guard(false)` to unreachable

Summary:
`llvm.guard(false)` always bails out of the current compilation unit, so
we can prune any control flow following it.

Reviewers: hfinkel, pcc, reames

Subscribers: majnemer, reames, mcrosier, llvm-commits

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

llvm-svn: 266955
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/SimplifyCFG/guards.ll [new file with mode: 0644]