[AArch64][GlobalISel] Don't localize TLS G_GLOBAL_VALUEs on Darwin.
authorAmara Emerson <aemerson@apple.com>
Mon, 23 Mar 2020 22:49:55 +0000 (15:49 -0700)
committerAmara Emerson <aemerson@apple.com>
Tue, 24 Mar 2020 20:35:50 +0000 (13:35 -0700)
commit472d282046d044b409fd2c550e101e85583c54a0
treedba607c146882b9d4ed006b3d7ecfe220fcb1ff1
parent5699d08b79afdaed167fb202a4e22d73d6f1bf48
[AArch64][GlobalISel] Don't localize TLS G_GLOBAL_VALUEs on Darwin.

On Darwin these need to be selected into a function call for the TLS
address lookup. As a result, they can't be moved below a physreg write,
which happens in call sequences. In the long term, we should have some
mechanism in the localizer to prevent localizing into target-specific
atomic instruction sequences.

rdar://60056248

Differential Revision: https://reviews.llvm.org/D76652
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/test/CodeGen/AArch64/GlobalISel/localizer-arm64-tti.ll