[PS4] Guarantee an instruction after a 'noreturn' call.
authorPaul Robinson <paul_robinson@playstation.sony.com>
Thu, 24 Mar 2016 00:10:03 +0000 (00:10 +0000)
committerPaul Robinson <paul_robinson@playstation.sony.com>
Thu, 24 Mar 2016 00:10:03 +0000 (00:10 +0000)
commitf81836bd18be6fb8bc6fe9942053f418dbb13d98
treed27cc0e2ec19f80a0aa8f3f4df8235215053bf34
parent1ee9fbd842273ab3fb6748c34d9f159a10ccb0d0
[PS4] Guarantee an instruction after a 'noreturn' call.

We need the "return address" of a noreturn call to be within the
bounds of the calling function; TrapUnreachable turns 'unreachable'
into a 'ud2' instruction, which has that desired effect.

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

llvm-svn: 264224
llvm/lib/Target/X86/X86TargetMachine.cpp
llvm/test/CodeGen/X86/br-fold.ll
llvm/test/CodeGen/X86/ps4-noreturn.ll [new file with mode: 0644]