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
..
2010-06-17 15:18:27 +00:00
2013-07-14 06:24:09 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2014-05-30 10:09:59 +00:00
2011-06-19 00:03:46 +00:00
2010-06-15 19:04:29 +00:00
2011-06-19 00:03:46 +00:00
2011-06-19 00:03:46 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2011-06-18 06:05:24 +00:00
2014-05-30 10:09:59 +00:00
2010-06-17 15:18:27 +00:00
2010-06-15 19:04:29 +00:00
2010-06-17 15:18:27 +00:00
2010-09-17 20:34:09 +00:00
2010-09-17 20:34:09 +00:00
2014-05-30 10:09:59 +00:00
2013-07-14 06:24:09 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2011-11-14 23:03:21 +00:00
2012-07-02 19:09:46 +00:00
2010-06-17 15:18:27 +00:00
2013-07-13 20:38:47 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2011-11-27 06:54:59 +00:00
2014-05-30 10:09:59 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2011-11-14 23:03:21 +00:00
2010-06-20 00:54:38 +00:00
2014-05-30 10:09:59 +00:00
2013-07-14 06:24:09 +00:00
2014-05-30 10:09:59 +00:00
2010-12-04 04:40:19 +00:00
2013-07-14 06:24:09 +00:00
2014-05-30 10:09:59 +00:00
2014-01-23 19:55:33 +00:00
2013-07-14 06:24:09 +00:00
2013-04-30 17:52:57 +00:00
2013-03-02 20:16:24 +00:00
2013-07-13 20:38:47 +00:00
2011-12-16 23:00:05 +00:00
2013-02-22 10:01:33 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-05-30 10:09:59 +00:00
2014-04-03 23:47:24 +00:00
2014-02-07 20:12:49 +00:00
2014-02-16 13:28:15 +00:00
2013-02-21 19:35:21 +00:00
2010-06-17 15:18:27 +00:00
2014-05-30 10:09:59 +00:00
2014-04-03 23:47:24 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2014-04-03 23:47:24 +00:00
2012-05-23 23:42:23 +00:00
2012-05-09 19:07:04 +00:00
2013-05-14 16:26:38 +00:00
2013-12-13 11:16:00 +00:00
2014-05-30 10:09:59 +00:00
2013-08-16 00:37:11 +00:00
2014-04-03 23:47:24 +00:00
2013-07-14 06:24:09 +00:00
2013-07-14 06:24:09 +00:00
2014-04-03 23:47:24 +00:00
2013-07-14 06:24:09 +00:00
2014-04-10 22:58:43 +00:00
2014-01-11 21:06:00 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-05-30 10:09:59 +00:00
2013-07-14 06:24:09 +00:00
2013-07-14 06:24:09 +00:00
2014-05-30 10:09:59 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2013-07-14 06:24:09 +00:00
2013-11-13 18:29:49 +00:00
2014-05-30 10:09:59 +00:00
2014-05-30 10:09:59 +00:00
2014-04-03 23:47:24 +00:00
2014-05-16 14:14:30 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2011-11-12 19:53:52 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-04 01:19:56 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2013-12-13 11:16:00 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 17:35:22 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-05-30 10:09:59 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2013-07-14 06:24:09 +00:00
2013-07-14 06:24:09 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2014-04-03 23:47:24 +00:00
2013-12-04 22:43:20 +00:00
2013-12-04 22:43:20 +00:00
2013-11-13 18:29:49 +00:00
2013-11-13 18:29:49 +00:00
2014-05-30 10:09:59 +00:00
2013-11-13 18:29:49 +00:00
2014-05-30 10:09:59 +00:00
2014-02-26 11:27:28 +00:00