llvm-6502/test/Transforms/LoopStrengthReduce
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 AArch64/ARM64: move ARM64 into AArch64's place 2014-05-24 12:50:23 +00:00
ARM ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
X86 Add the ability to use GEPs for address sinking in CGP 2014-04-12 00:59:48 +00:00
2005-08-15-AddRecIV.ll
2005-08-17-OutOfLoopVariant.ll
2005-09-12-UsesOutOutsideOfLoop.ll
2007-04-23-UseIterator.ll
2008-08-13-CmpStride.ll
2008-09-09-Overflow.ll
2009-01-13-nonconstant-stride-outside-loop.ll
2009-04-28-no-reduce-mul.ll
2011-07-19-CritEdgeBreakCrash.ll
2011-10-03-CritEdgeMerge.ll
2011-10-06-ReusePhi.ll
2011-10-13-SCEVChain.ll
2011-10-14-IntPtr.ll
2011-12-19-PostincQuadratic.ll
2012-01-02-nopreheader.ll
2012-01-16-nopreheader.ll
2012-03-15-nopreheader.ll
2012-03-26-constexpr.ll
2012-07-13-ExpandUDiv.ll
2012-07-18-LimitReassociate.ll
2013-01-05-IndBr.ll
2013-01-14-ReuseCast.ll
addrec-gep-address-space.ll Teach loop-idiom about address space pointer sizes 2013-09-11 05:09:42 +00:00
addrec-gep.ll
address-space-loop.ll Teach loop-idiom about address space pointer sizes 2013-09-11 05:09:42 +00:00
count-to-zero.ll
dead-phi.ll
different-type-ivs.ll
dominate-assert.ll SCEVExpander: Fix a regression I introduced by to eagerly adding RAII objects. 2013-10-01 12:17:11 +00:00
dont_insert_redundant_ops.ll Convert test to FileCheck 2014-04-23 19:32:37 +00:00
dont_reduce_bytes.ll
dont_reverse.ll
dont-hoist-simple-loop-constants.ll
exit_compare_live_range.ll
hoist-parent-preheader.ll
invariant_value_first_arg.ll
invariant_value_first.ll
ivchain.ll
lsr-expand-quadratic.ll Fix broken CHECK lines. 2014-01-11 21:06:00 +00:00
nested-reduce.ll
nonlinear-postinc.ll
ops_after_indvar.ll
phi_node_update_multiple_preds.ll
post-inc-icmpzero.ll
pr2537.ll
pr2570.ll
pr3086.ll
pr3399.ll
pr3571.ll
pr12018.ll
pr12048.ll
pr12691.ll
pr18165.ll Fix PR18165: LSR must avoid scaling factors that exceed the limit on truncated use. 2014-02-26 16:31:56 +00:00
preserve-gep-loop-variant.ll
quadradic-exit-value.ll Fix LSR: don't normalize quadratic recurrences. 2013-10-25 21:35:52 +00:00
related_indvars.ll
remove_indvar.ll
scaling_factor_cost_crash.ll
share_code_in_preheader.ll
share_ivs.ll
uglygep-address-space.ll Teach loop-idiom about address space pointer sizes 2013-09-11 05:09:42 +00:00
uglygep.ll
use_postinc_value_outside_loop.ll
var_stride_used_by_compare.ll
variable_stride.ll