[ARM] create new pseudo t2LDRLIT_ga_pcrel for stack guards
authorNick Desaulniers <ndesaulniers@google.com>
Tue, 30 Nov 2021 07:45:20 +0000 (08:45 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 30 Nov 2021 07:46:05 +0000 (08:46 +0100)
commit89453ed6f2059b5cec576fc41914def713fe38f7
tree3279bf3ef306ea53c9d33f7a004959d6dfcc6f59
parent5bbe50148f3b515c170be22209395b72890f5b8c
[ARM] create new pseudo t2LDRLIT_ga_pcrel for stack guards

We can't use the existing pseudo ARM::tLDRLIT_ga_pcrel for loading the
stack guard for PIC code that references the GOT, since arm-pseudo may
expand this to the narrow tLDRpci rather than the wider t2LDRpci.

Create a new pseudo, t2LDRLIT_ga_pcrel, and expand it to t2LDRpci.

Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1270361

Reviewed By: ardb

Differential Revision: https://reviews.llvm.org/D114762
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
llvm/test/CodeGen/ARM/expand-pseudos.ll [new file with mode: 0644]