llvm/test/CodeGen
Tim Northover d0dbe02fd2 ARM & AArch64: make use of common cmpxchg idioms after expansion
The C and C++ semantics for compare_exchange require it to return a bool
indicating success. This gets mapped to LLVM IR which follows each cmpxchg with
an icmp of the value loaded against the desired value.

When lowered to ldxr/stxr loops, this extra comparison is redundant: its
results are implicit in the control-flow of the function.

This commit makes two changes: it replaces that icmp with appropriate PHI
nodes, and then makes sure earlyCSE is called after expansion to actually make
use of the opportunities revealed.

I've also added -{arm,aarch64}-enable-atomic-tidy options, so that
existing fragile tests aren't perturbed too much by the change. Many
of them either rely on undef/unreachable too pervasively to be
restored to something well-defined (particularly while making sure
they test the same obscure assert from many years ago), or depend on a
particular CFG shape, which is disrupted by SimplifyCFG.

rdar://problem/16227836

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209883 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-30 10:09:59 +00:00
..
AArch64 ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
ARM ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
CPP
Generic MC: move test from Generic to COFF 2014-04-23 21:41:07 +00:00
Hexagon reverting r209132 2014-05-19 16:22:11 +00:00
Inputs
Mips [pr19844] Add thread local mode to aliases. 2014-05-28 18:15:43 +00:00
MSP430 Fix broken FileCheck prefixes 2014-05-23 19:06:24 +00:00
NVPTX Fix the test: DCE optimized away everything. 2014-04-21 17:23:12 +00:00
PowerPC [PPC] Use alias symbols in address computation. 2014-05-29 15:41:38 +00:00
R600 R600: Try to convert BFE back to standard bit ops when possible. 2014-05-22 18:09:12 +00:00
SPARC TableGen: fix operand counting for aliases 2014-05-16 09:42:04 +00:00
SystemZ Reenable use of TBAA during CodeGen 2014-04-12 01:26:00 +00:00
Thumb Segmented stacks: omit __morestack call when there's no frame. 2014-05-22 13:03:43 +00:00
Thumb2 ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
X86 [X86] Move test from r209863 to CodeGen/X86 2014-05-29 23:52:53 +00:00
XCore Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" 2014-04-21 17:57:07 +00:00