OSDN Git Service

[AArch64] Mark mrs of TPIDR_EL0 (thread pointer) as *having* side effects.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 21 Nov 2017 18:08:34 +0000 (18:08 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 21 Nov 2017 18:08:34 +0000 (18:08 +0000)
commit83ff5e44f4bd0388e16160f0ee38cb686c4963af
treec6b3c02adb6eb808f63e0ca273026b96f15f5e51
parenta5579c645ae5f985789525c8936b9f86f55e43b2
[AArch64] Mark mrs of TPIDR_EL0 (thread pointer) as *having* side effects.

This partially reverts r298851.  The the underlying issue is that we don't
currently model the dependency between mrs (read system register) and
msr (write system register) instructions.

Something like the below should never be reordered:

 msr TPIDR_EL0, x0  ;; set thread pointer
 mrs x8, TPIDR_EL0  ;; read thread pointer

but was being reordered after r298851.  The functional part of the patch
that wasn't reverted needed to remain in place in order to not break
r299462.

PR35317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318788 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.td
test/CodeGen/AArch64/thread-pointer.ll [deleted file]