]> granicus.if.org Git - llvm/commit
ARM: Fix cmpxchg O0 expansion
authorMatthias Braun <matze@braunis.de>
Wed, 31 May 2017 01:21:35 +0000 (01:21 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 31 May 2017 01:21:35 +0000 (01:21 +0000)
commit6ef5e10ad7e1ea975ebd1ec44f6703866128f616
tree2902fa425d2bb5b09ed856b4bcfbfd5cd05659fd
parent5cc8b8253ed81c3166421e83e2a26e5402505635
ARM: Fix cmpxchg O0 expansion

This is the equivalent of r304048 for ARM:

- 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@304267 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMExpandPseudoInsts.cpp
test/CodeGen/ARM/cmpxchg-O0.ll