]> granicus.if.org Git - llvm/commit
AArch64: Fix cmpxchg O0 expansion
authorMatthias Braun <matze@braunis.de>
Fri, 26 May 2017 23:48:59 +0000 (23:48 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 26 May 2017 23:48:59 +0000 (23:48 +0000)
commitabfdee4bbfe48a9ec43ac174c7886f730dfd2646
tree1ee4710996ba8887b59c1137e508ea173178c483
parent83c5dbf28091daf5af0efef11de265673e98d932
AArch64: Fix cmpxchg O0 expansion

- Rewrite livein calculation to use the computeLiveIns() helper
  function. This is slightly less efficient but easier to reason about
  and doesn't unnecessarily add pristine and reserved registers[1]
- Zero the status register at the beginning of the loop to make sure it
  has a defined value.
- Remove kill flags of values that need to stay alive throughout the loop.

[1] An upcoming commit of mine will tighten the MachineVerifier to catch
    these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304048 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
test/CodeGen/AArch64/cmpxchg-O0.ll
test/CodeGen/AArch64/fast-isel-cmpxchg.ll