]>
git.proxmox.com Git - rustc.git/blob - src/llvm/test/CodeGen/SystemZ/Large/branch-range-02.py
1 # Test normal conditional branches in cases where block alignments cause
2 # some branches to be out of range.
3 # RUN: python %s | llc -mtriple=s390x-linux-gnu -align-all-blocks=8 | FileCheck %s
8 # conditional branch to end
11 # conditional branch to end
13 # conditional branch to b0
16 # conditional branch to b0
19 # with N == 256 + 4. The -align-all-blocks=8 option ensures that all blocks
20 # are 256 bytes in size. The first 4 blocks and the last 4 blocks are then
23 # CHECK: c %r4, 0(%r3)
24 # CHECK: jge [[LABEL:\.L[^ ]*]]
25 # CHECK: c %r4, 4(%r3)
26 # CHECK: jge [[LABEL]]
27 # CHECK: c %r4, 8(%r3)
28 # CHECK: jge [[LABEL]]
29 # CHECK: c %r4, 12(%r3)
30 # CHECK: jge [[LABEL]]
31 # CHECK: c %r4, 16(%r3)
33 # CHECK: c %r4, 20(%r3)
35 # CHECK: c %r4, 24(%r3)
37 # CHECK: c %r4, 28(%r3)
39 # ...lots of other blocks...
40 # CHECK: c %r4, 1004(%r3)
41 # CHECK: je [[LABEL:\.L[^ ]*]]
42 # CHECK: c %r4, 1008(%r3)
44 # CHECK: c %r4, 1012(%r3)
46 # CHECK: c %r4, 1016(%r3)
48 # CHECK: c %r4, 1020(%r3)
50 # CHECK: c %r4, 1024(%r3)
51 # CHECK: jge [[LABEL]]
52 # CHECK: c %r4, 1028(%r3)
53 # CHECK: jge [[LABEL]]
54 # CHECK: c %r4, 1032(%r3)
55 # CHECK: jge [[LABEL]]
56 # CHECK: c %r4, 1036(%r3)
57 # CHECK: jge [[LABEL]]
61 print 'define void @f1(i8 *%base, i32 *%stop, i32 %limit) {'
67 for i
in xrange(blocks
):
70 next
= 'b%d' % (i
+ 1) if i
+ 1 < blocks
else 'end'
71 other
= 'end' if 2 * i
< blocks
else 'b0'
73 print ' store volatile i8 %d, i8 *%%base' % value
74 print ' %%astop%d = getelementptr i32 *%%stop, i64 %d' % (i
, i
)
75 print ' %%acur%d = load i32 *%%astop%d' % (i
, i
)
76 print ' %%atest%d = icmp eq i32 %%limit, %%acur%d' % (i
, i
)
77 print ' br i1 %%atest%d, label %%%s, label %%%s' % (i
, other
, next
)