OSDN Git Service

[MachineOutliner] Fix offset overflow check
authorJessica Paquette <jpaquette@apple.com>
Thu, 7 Dec 2017 21:51:43 +0000 (21:51 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 7 Dec 2017 21:51:43 +0000 (21:51 +0000)
commitc297153c36468bdfc686d43fcb0558edfb6b70bb
tree36b0e3c5ea9ab010474ab8192c5c48e5f89972d5
parentf534f4a24f765d802b68b1ff32066ce668a2c566
[MachineOutliner] Fix offset overflow check

The offset overflow check before was incorrect. It would always give the
correct result, but it was comparing the SCALED potential fixed-up offset
against an UNSCALED minimum/maximum. As a result, the outliner was missing a
bunch of frame setup/destroy instructions that ought to have been safe to
outline. This fixes that, and adds an instruction to the .mir test that
failed the old test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320090 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/machine-outliner.mir