llvm-6502/test/CodeGen/SystemZ
Tim Northover 8f2a85e099 IR: add "cmpxchg weak" variant to support permitted failure.
This commit adds a weak variant of the cmpxchg operation, as described
in C++11. A cmpxchg instruction with this modifier is permitted to
fail to store, even if the comparison indicated it should.

As a result, cmpxchg instructions must return a flag indicating
success in addition to their original iN value loaded. Thus, for
uniformity *all* cmpxchg instructions now return "{ iN, i1 }". The
second flag is 1 when the store succeeded.

At the DAG level, a new ATOMIC_CMP_SWAP_WITH_SUCCESS node has been
added as the natural representation for the new cmpxchg instructions.
It is a strong cmpxchg.

By default this gets Expanded to the existing ATOMIC_CMP_SWAP during
Legalization, so existing backends should see no change in behaviour.
If they wish to deal with the enhanced node instead, they can call
setOperationAction on it. Beware: as a node with 2 results, it cannot
be selected from TableGen.

Currently, no use is made of the extra information provided in this
patch. Test updates are almost entirely adapting the input IR to the
new scheme.

Summary for out of tree users:
------------------------------

+ Legacy Bitcode files are upgraded during read.
+ Legacy assembly IR files will be invalid.
+ Front-ends must adapt to different type for "cmpxchg".
+ Backends should be unaffected by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-13 14:24:07 +00:00
..
Large Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
addr-01.ll
addr-02.ll
addr-03.ll
alias-01.ll Reenable use of TBAA during CodeGen 2014-04-12 01:26:00 +00:00
alloca-01.ll
alloca-02.ll
and-01.ll
and-02.ll
and-03.ll
and-04.ll
and-05.ll
and-06.ll
and-07.ll
and-08.ll
args-01.ll
args-02.ll
args-03.ll
args-04.ll
args-05.ll
args-06.ll
asm-01.ll
asm-02.ll
asm-03.ll
asm-04.ll
asm-05.ll
asm-06.ll
asm-07.ll
asm-08.ll
asm-09.ll
asm-10.ll
asm-11.ll
asm-12.ll
asm-13.ll
asm-14.ll
asm-15.ll
asm-16.ll
asm-17.ll
asm-18.ll [SystemZ] Add comparisons of high words and memory 2013-10-01 15:00:44 +00:00
atomic-load-01.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-load-02.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-load-03.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-load-04.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-store-01.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-store-02.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-store-03.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomic-store-04.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
atomicrmw-add-01.ll
atomicrmw-add-02.ll
atomicrmw-add-03.ll
atomicrmw-add-04.ll
atomicrmw-add-05.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-add-06.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-and-01.ll
atomicrmw-and-02.ll
atomicrmw-and-03.ll
atomicrmw-and-04.ll
atomicrmw-and-05.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-and-06.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-minmax-01.ll
atomicrmw-minmax-02.ll
atomicrmw-minmax-03.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
atomicrmw-minmax-04.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
atomicrmw-nand-01.ll
atomicrmw-nand-02.ll
atomicrmw-nand-03.ll
atomicrmw-nand-04.ll
atomicrmw-or-01.ll
atomicrmw-or-02.ll
atomicrmw-or-03.ll
atomicrmw-or-04.ll
atomicrmw-or-05.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-or-06.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-sub-01.ll
atomicrmw-sub-02.ll
atomicrmw-sub-03.ll
atomicrmw-sub-04.ll
atomicrmw-sub-05.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-sub-06.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-xchg-01.ll
atomicrmw-xchg-02.ll
atomicrmw-xchg-03.ll
atomicrmw-xchg-04.ll
atomicrmw-xor-01.ll
atomicrmw-xor-02.ll
atomicrmw-xor-03.ll
atomicrmw-xor-04.ll
atomicrmw-xor-05.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
atomicrmw-xor-06.ll [SystemZ] Use interlocked-access 1 instructions for CodeGen 2013-12-24 15:18:04 +00:00
branch-01.ll
branch-02.ll
branch-03.ll
branch-04.ll
branch-05.ll
branch-06.ll
branch-07.ll [SystemZ] Improve handling of SETCC 2013-10-16 11:10:55 +00:00
branch-08.ll
branch-09.ll
branch-10.ll
bswap-01.ll
bswap-02.ll [SystemZ] Set usaAA to true 2013-10-28 13:53:37 +00:00
bswap-03.ll
bswap-04.ll
bswap-05.ll
call-01.ll
call-02.ll
call-03.ll
cmpxchg-01.ll IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
cmpxchg-02.ll IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
cmpxchg-03.ll IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
cmpxchg-04.ll IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
cond-load-01.ll
cond-load-02.ll
cond-move-01.ll
cond-store-01.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
cond-store-02.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
cond-store-03.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
cond-store-04.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:49:34 +00:00
cond-store-05.ll
cond-store-06.ll
cond-store-07.ll
cond-store-08.ll
fp-abs-01.ll
fp-abs-02.ll
fp-add-01.ll
fp-add-02.ll
fp-add-03.ll
fp-cmp-01.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
fp-cmp-02.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
fp-cmp-03.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
fp-cmp-04.ll Fix known typos 2014-01-24 17:20:08 +00:00
fp-const-01.ll
fp-const-02.ll
fp-const-03.ll
fp-const-04.ll
fp-const-05.ll
fp-const-06.ll
fp-const-07.ll
fp-const-08.ll
fp-const-09.ll
fp-conv-01.ll
fp-conv-02.ll
fp-conv-03.ll
fp-conv-04.ll
fp-conv-05.ll
fp-conv-06.ll [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
fp-conv-07.ll
fp-conv-08.ll [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
fp-conv-09.ll
fp-conv-10.ll [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
fp-conv-11.ll
fp-conv-12.ll [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
fp-conv-13.ll [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
fp-conv-14.ll [SystemZ] Add support for z196 float<->unsigned conversions 2014-03-21 10:56:30 +00:00
fp-copysign-01.ll
fp-div-01.ll
fp-div-02.ll
fp-div-03.ll
fp-move-01.ll
fp-move-02.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
fp-move-03.ll
fp-move-04.ll
fp-move-05.ll
fp-move-06.ll
fp-move-07.ll
fp-move-08.ll
fp-move-09.ll [SystemZ] Extend pseudo conditional 8- and 16-bit stores to high words 2013-10-01 14:33:55 +00:00
fp-mul-01.ll
fp-mul-02.ll
fp-mul-03.ll
fp-mul-04.ll
fp-mul-05.ll
fp-mul-06.ll
fp-mul-07.ll
fp-mul-08.ll
fp-mul-09.ll
fp-neg-01.ll
fp-round-01.ll
fp-round-02.ll
fp-sqrt-01.ll
fp-sqrt-02.ll
fp-sqrt-03.ll
fp-sub-01.ll
fp-sub-02.ll
fp-sub-03.ll
frame-01.ll
frame-02.ll
frame-03.ll
frame-04.ll
frame-05.ll
frame-06.ll
frame-07.ll
frame-08.ll Fix known typos 2014-01-24 17:20:08 +00:00
frame-09.ll
frame-10.ll
frame-11.ll [SystemZ] Flesh out stackrestore test (frame-11.ll) 2014-01-13 15:44:44 +00:00
frame-13.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:36:34 +00:00
frame-14.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:36:34 +00:00
frame-15.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
frame-16.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
frame-17.ll
frame-18.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
insert-01.ll
insert-02.ll
insert-03.ll
insert-04.ll
insert-05.ll
insert-06.ll Extend (truncate (load)) folding 2013-12-11 11:37:27 +00:00
int-abs-01.ll [SystemZ] Extend integer absolute selection 2013-12-13 15:35:00 +00:00
int-add-01.ll
int-add-02.ll
int-add-03.ll
int-add-04.ll
int-add-05.ll
int-add-06.ll
int-add-07.ll
int-add-08.ll
int-add-09.ll [SystemZ] Set usaAA to true 2013-10-28 13:53:37 +00:00
int-add-10.ll [SystemZ] Set usaAA to true 2013-10-28 13:53:37 +00:00
int-add-11.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
int-add-12.ll [SystemZ] Use A(G)SI when spilling the target of a constant addition 2013-10-15 08:42:59 +00:00
int-add-13.ll
int-add-14.ll
int-add-15.ll
int-add-16.ll
int-cmp-01.ll
int-cmp-02.ll
int-cmp-03.ll
int-cmp-04.ll
int-cmp-05.ll [SystemZ] Extend the use of C(L)GFR 2013-12-06 09:56:50 +00:00
int-cmp-06.ll [SystemZ] Extend the use of C(L)GFR 2013-12-06 09:56:50 +00:00
int-cmp-07.ll
int-cmp-08.ll
int-cmp-09.ll
int-cmp-10.ll
int-cmp-11.ll
int-cmp-12.ll
int-cmp-13.ll
int-cmp-14.ll
int-cmp-15.ll
int-cmp-16.ll
int-cmp-17.ll
int-cmp-18.ll
int-cmp-19.ll
int-cmp-20.ll
int-cmp-21.ll
int-cmp-22.ll
int-cmp-23.ll
int-cmp-24.ll
int-cmp-25.ll
int-cmp-26.ll
int-cmp-27.ll
int-cmp-28.ll
int-cmp-29.ll
int-cmp-30.ll
int-cmp-31.ll
int-cmp-32.ll
int-cmp-33.ll
int-cmp-34.ll
int-cmp-35.ll
int-cmp-36.ll
int-cmp-37.ll
int-cmp-38.ll
int-cmp-39.ll
int-cmp-40.ll
int-cmp-41.ll
int-cmp-42.ll
int-cmp-43.ll
int-cmp-44.ll Fix known typos 2014-01-24 17:20:08 +00:00
int-cmp-45.ll Fix known typos 2014-01-24 17:20:08 +00:00
int-cmp-46.ll
int-cmp-47.ll [SystemZ] Make more use of TMHH 2013-12-13 15:46:55 +00:00
int-cmp-48.ll
int-cmp-49.ll [SystemZ] Fix TMHH and TMHL usage for z10 with -O0 2013-11-22 17:28:28 +00:00
int-const-01.ll
int-const-02.ll
int-const-03.ll
int-const-04.ll
int-const-05.ll
int-const-06.ll
int-conv-01.ll
int-conv-02.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
int-conv-03.ll
int-conv-04.ll
int-conv-05.ll
int-conv-06.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
int-conv-07.ll
int-conv-08.ll
int-conv-09.ll
int-conv-10.ll
int-conv-11.ll
int-div-01.ll Revert "Add -mcpu=z10 to SystemZ tests." 2013-12-18 23:04:37 +00:00
int-div-02.ll
int-div-03.ll Revert "Add -mcpu=z10 to SystemZ tests." 2013-12-18 23:04:37 +00:00
int-div-04.ll Revert "Add -mcpu=z10 to SystemZ tests." 2013-12-18 23:04:37 +00:00
int-div-05.ll
int-div-06.ll
int-move-01.ll
int-move-02.ll
int-move-03.ll
int-move-04.ll
int-move-05.ll
int-move-06.ll
int-move-07.ll
int-move-08.ll
int-move-09.ll
int-mul-01.ll
int-mul-02.ll
int-mul-03.ll
int-mul-04.ll
int-mul-05.ll
int-mul-06.ll
int-mul-07.ll
int-mul-08.ll Revert "Add -mcpu=z10 to SystemZ tests." 2013-12-18 23:04:37 +00:00
int-neg-01.ll
int-neg-02.ll [SystemZ] Extend integer absolute selection 2013-12-13 15:35:00 +00:00
int-sub-01.ll
int-sub-02.ll
int-sub-03.ll
int-sub-04.ll
int-sub-05.ll
int-sub-06.ll
int-sub-07.ll
int-sub-08.ll
int-sub-09.ll
la-01.ll
la-02.ll
la-03.ll
la-04.ll
lit.local.cfg Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
loop-01.ll
mature-mc-support.ll Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call 2014-02-13 14:44:26 +00:00
memchr-01.ll
memchr-02.ll
memcmp-01.ll
memcmp-02.ll
memcpy-01.ll
memcpy-02.ll
memset-01.ll
memset-02.ll
memset-03.ll
memset-04.ll
or-01.ll
or-02.ll
or-03.ll
or-04.ll
or-05.ll
or-06.ll
or-07.ll
or-08.ll
prefetch-01.ll
risbg-01.ll [SystemZ] Improve risbg-01.ll test 2014-01-13 15:40:25 +00:00
risbg-02.ll
rnsbg-01.ll [SystemZ] Fix RNSBG bug introduced by r197802 2014-01-09 11:28:53 +00:00
rosbg-01.ll [SystemZ] Fix RNSBG bug introduced by r197802 2014-01-09 11:28:53 +00:00
rxsbg-01.ll [SystemZ] Fix RNSBG bug introduced by r197802 2014-01-09 11:28:53 +00:00
selectcc-01.ll [SystemZ] Optimize selects between 0 and -1 2013-12-06 09:53:09 +00:00
selectcc-02.ll [SystemZ] Optimize selects between 0 and -1 2013-12-06 09:53:09 +00:00
selectcc-03.ll [SystemZ] Optimize selects between 0 and -1 2013-12-06 09:53:09 +00:00
serialize-01.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:36:34 +00:00
setcc-01.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
setcc-02.ll [SystemZ] Automatically detect zEC12 and z196 hosts 2013-10-31 12:14:17 +00:00
shift-01.ll
shift-02.ll
shift-03.ll
shift-04.ll Handle masked rotate amounts 2014-01-09 10:56:42 +00:00
shift-05.ll
shift-06.ll
shift-07.ll
shift-08.ll
shift-09.ll
shift-10.ll [SystemZ] Optimize (sext (ashr (shl ...), ...)) 2014-01-13 15:17:53 +00:00
spill-01.ll Add TargetLowering::prepareVolatileOrAtomicLoad 2013-12-10 10:36:34 +00:00
strcmp-01.ll
strcmp-02.ll
strcpy-01.ll
strlen-01.ll
strlen-02.ll
tls-01.ll
unaligned-01.ll [SystemZ] Set usaAA to true 2013-10-28 13:53:37 +00:00
xor-01.ll
xor-02.ll
xor-03.ll
xor-04.ll
xor-05.ll
xor-06.ll
xor-07.ll
xor-08.ll