summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/Large/branch-range-02.py
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/Large/branch-range-02.py')
-rw-r--r--llvm/test/CodeGen/SystemZ/Large/branch-range-02.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/llvm/test/CodeGen/SystemZ/Large/branch-range-02.py b/llvm/test/CodeGen/SystemZ/Large/branch-range-02.py
index 7f7b09954a6..4566d9746e8 100644
--- a/llvm/test/CodeGen/SystemZ/Large/branch-range-02.py
+++ b/llvm/test/CodeGen/SystemZ/Large/branch-range-02.py
@@ -56,12 +56,14 @@
# CHECK: c %r4, 1036(%r3)
# CHECK: jge [[LABEL]]
+from __future__ import print_function
+
blocks = 256 + 4
-print 'define void @f1(i8 *%base, i32 *%stop, i32 %limit) {'
-print 'entry:'
-print ' br label %b0'
-print ''
+print('define void @f1(i8 *%base, i32 *%stop, i32 %limit) {')
+print('entry:')
+print(' br label %b0')
+print('')
a, b = 1, 1
for i in xrange(blocks):
@@ -69,14 +71,14 @@ for i in xrange(blocks):
value = a % 256
next = 'b%d' % (i + 1) if i + 1 < blocks else 'end'
other = 'end' if 2 * i < blocks else 'b0'
- print 'b%d:' % i
- print ' store volatile i8 %d, i8 *%%base' % value
- print ' %%astop%d = getelementptr i32, i32 *%%stop, i64 %d' % (i, i)
- print ' %%acur%d = load i32 , i32 *%%astop%d' % (i, i)
- print ' %%atest%d = icmp eq i32 %%limit, %%acur%d' % (i, i)
- print ' br i1 %%atest%d, label %%%s, label %%%s' % (i, other, next)
+ print('b%d:' % i)
+ print(' store volatile i8 %d, i8 *%%base' % value)
+ print(' %%astop%d = getelementptr i32, i32 *%%stop, i64 %d' % (i, i))
+ print(' %%acur%d = load i32 , i32 *%%astop%d' % (i, i))
+ print(' %%atest%d = icmp eq i32 %%limit, %%acur%d' % (i, i))
+ print(' br i1 %%atest%d, label %%%s, label %%%s' % (i, other, next))
-print ''
-print '%s:' % next
-print ' ret void'
-print '}'
+print('')
+print('%s:' % next)
+print(' ret void')
+print('}')
OpenPOWER on IntegriCloud