[AArch64][Outliner] Don't outline BTI instructions
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 5 Feb 2019 17:21:57 +0000 (17:21 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 5 Feb 2019 17:21:57 +0000 (17:21 +0000)
commit78dc38ec94229f38c5de74a8930eed623a27350e
tree5ef63989b98172554367e73e48f42ee984577bd1
parent822d2e35e7729ea844580152ff635262d2cf44e9
[AArch64][Outliner] Don't outline BTI instructions

We can't outline BTI instructions, because they need to be the very first
instruction executed after an indirect call or branch. If we outline them, then
an indirect call might go to the branch to the outlined function, which will
fault.

Differential revision: https://reviews.llvm.org/D57753

llvm-svn: 353190
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/machine-outliner-outline-bti.ll [new file with mode: 0644]