diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-12-10 10:36:34 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-12-10 10:36:34 +0000 |
commit | 9afe613d121c99e66ca2224dcb426604867151e3 (patch) | |
tree | e46fdce4d40c4bb4c63c81edfc3b4fa386a35d80 /llvm/test/CodeGen/SystemZ/Large/branch-range-11.py | |
parent | b00a0e2971f5fbc1c069dbc4b4019ed5ca304fe9 (diff) | |
download | bcm5719-llvm-9afe613d121c99e66ca2224dcb426604867151e3.tar.gz bcm5719-llvm-9afe613d121c99e66ca2224dcb426604867151e3.zip |
Add TargetLowering::prepareVolatileOrAtomicLoad
One unusual feature of the z architecture is that the result of a
previous load can be reused indefinitely for subsequent loads, even if
a cache-coherent store to that location is performed by another CPU.
A special serializing instruction must be used if you want to force
a load to be reattempted.
Since volatile loads are not supposed to be omitted in this way,
we should insert a serializing instruction before each such load.
The same goes for atomic loads.
The patch implements this at the IR->DAG boundary, in a similar way
to atomic fences. It is a no-op for targets other than SystemZ.
llvm-svn: 196905
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/Large/branch-range-11.py')
-rw-r--r-- | llvm/test/CodeGen/SystemZ/Large/branch-range-11.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/SystemZ/Large/branch-range-11.py b/llvm/test/CodeGen/SystemZ/Large/branch-range-11.py index 034902c4a34..054610380e3 100644 --- a/llvm/test/CodeGen/SystemZ/Large/branch-range-11.py +++ b/llvm/test/CodeGen/SystemZ/Large/branch-range-11.py @@ -98,8 +98,8 @@ print '' for i in xrange(branch_blocks): next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main' print 'before%d:' % i - print ' %%bcur%da = load volatile i32 *%%stopa' % i - print ' %%bcur%db = load volatile i32 *%%stopb' % i + print ' %%bcur%da = load i32 *%%stopa' % i + print ' %%bcur%db = load i32 *%%stopb' % i print ' %%bsub%d = sub i32 %%bcur%da, %%bcur%db' % (i, i, i) print ' %%btest%d = icmp ult i32 %%bsub%d, %d' % (i, i, i + 50) print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next) @@ -115,8 +115,8 @@ for i in xrange(0, main_size, 6): print ' store volatile i8 %d, i8 *%%ptr%d' % (value, i) for i in xrange(branch_blocks): - print ' %%acur%da = load volatile i32 *%%stopa' % i - print ' %%acur%db = load volatile i32 *%%stopb' % i + print ' %%acur%da = load i32 *%%stopa' % i + print ' %%acur%db = load i32 *%%stopb' % i print ' %%asub%d = sub i32 %%acur%da, %%acur%db' % (i, i, i) print ' %%atest%d = icmp ult i32 %%asub%d, %d' % (i, i, i + 100) print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i) |