ARM: tell LLVM about zext properties of ldrexb/ldrexh
authorTim Northover <tnorthover@apple.com>
Thu, 3 Apr 2014 15:10:35 +0000 (15:10 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 3 Apr 2014 15:10:35 +0000 (15:10 +0000)
commitd5561bb1f0fe5c67af59d79a6961ebf4b3c7b953
treed54caf5e1716ad65081e0c1059555564b5b9cd71
parent769a6f211604f0285c419102846cfc91ab1e63cc
ARM: tell LLVM about zext properties of ldrexb/ldrexh

Implementing this via ComputeMaskedBits has two advantages:
  + It actually works. DAGISel doesn't deal with the chains properly
    in the previous pattern-based solution, so they never trigger.
  + The information can be used in other DAG combines, as well as the
    trivial "get rid of truncs". For example if the trunc is in a
    different basic block.

rdar://problem/16227836

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205540 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
test/CodeGen/ARM/atomic-ops-v8.ll
test/CodeGen/ARM/ldaex-stlex.ll
test/CodeGen/ARM/ldstrex.ll