llvm.org GIT mirror llvm / 834cb56
Update SystemZ/Large test generators to handle new load IR syntax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230809 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 4 years ago
14 changed file(s) with 27 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
7878 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
7979 print 'before%d:' % i
8080 print ' %%bstop%d = getelementptr i32 *%%stop, i64 %d' % (i, i)
81 print ' %%bcur%d = load i32 *%%bstop%d' % (i, i)
81 print ' %%bcur%d = load i32 , i32 *%%bstop%d' % (i, i)
8282 print ' %%btest%d = icmp eq i32 %%limit, %%bcur%d' % (i, i)
8383 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
8484 print ''
9494
9595 for i in xrange(branch_blocks):
9696 print ' %%astop%d = getelementptr i32 *%%stop, i64 %d' % (i, i + 25)
97 print ' %%acur%d = load i32 *%%astop%d' % (i, i)
97 print ' %%acur%d = load i32 , i32 *%%astop%d' % (i, i)
9898 print ' %%atest%d = icmp eq i32 %%limit, %%acur%d' % (i, i)
9999 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
100100 print ''
7171 print 'b%d:' % i
7272 print ' store volatile i8 %d, i8 *%%base' % value
7373 print ' %%astop%d = getelementptr i32 *%%stop, i64 %d' % (i, i)
74 print ' %%acur%d = load i32 *%%astop%d' % (i, i)
74 print ' %%acur%d = load i32 , i32 *%%astop%d' % (i, i)
7575 print ' %%atest%d = icmp eq i32 %%limit, %%acur%d' % (i, i)
7676 print ' br i1 %%atest%d, label %%%s, label %%%s' % (i, other, next)
7777
7878 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
7979 print 'before%d:' % i
8080 print ' %%bstop%d = getelementptr i8 *%%stop, i64 %d' % (i, i)
81 print ' %%bcur%d = load i8 *%%bstop%d' % (i, i)
81 print ' %%bcur%d = load i8 , i8 *%%bstop%d' % (i, i)
8282 print ' %%bext%d = sext i8 %%bcur%d to i32' % (i, i)
8383 print ' %%btest%d = icmp eq i32 %%limit, %%bext%d' % (i, i)
8484 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
9595
9696 for i in xrange(branch_blocks):
9797 print ' %%astop%d = getelementptr i8 *%%stop, i64 %d' % (i, i + 25)
98 print ' %%acur%d = load i8 *%%astop%d' % (i, i)
98 print ' %%acur%d = load i8 , i8 *%%astop%d' % (i, i)
9999 print ' %%aext%d = sext i8 %%acur%d to i32' % (i, i)
100100 print ' %%atest%d = icmp eq i32 %%limit, %%aext%d' % (i, i)
101101 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
8282 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
8383 print 'before%d:' % i
8484 print ' %%bstop%d = getelementptr i8 *%%stop, i64 %d' % (i, i)
85 print ' %%bcur%d = load i8 *%%bstop%d' % (i, i)
85 print ' %%bcur%d = load i8 , i8 *%%bstop%d' % (i, i)
8686 print ' %%bext%d = sext i8 %%bcur%d to i64' % (i, i)
8787 print ' %%btest%d = icmp eq i64 %%limit, %%bext%d' % (i, i)
8888 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
9999
100100 for i in xrange(branch_blocks):
101101 print ' %%astop%d = getelementptr i8 *%%stop, i64 %d' % (i, i + 25)
102 print ' %%acur%d = load i8 *%%astop%d' % (i, i)
102 print ' %%acur%d = load i8 , i8 *%%astop%d' % (i, i)
103103 print ' %%aext%d = sext i8 %%acur%d to i64' % (i, i)
104104 print ' %%atest%d = icmp eq i64 %%limit, %%aext%d' % (i, i)
105105 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
8181 for i in xrange(branch_blocks):
8282 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
8383 print 'before%d:' % i
84 print ' %%bcur%d = load i8 *%%stop' % i
84 print ' %%bcur%d = load i8 , i8 *%%stop' % i
8585 print ' %%bext%d = sext i8 %%bcur%d to i32' % (i, i)
8686 print ' %%btest%d = icmp slt i32 %%bext%d, %d' % (i, i, i + 50)
8787 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
9797 print ' store volatile i8 %d, i8 *%%ptr%d' % (value, i)
9898
9999 for i in xrange(branch_blocks):
100 print ' %%acur%d = load i8 *%%stop' % i
100 print ' %%acur%d = load i8 , i8 *%%stop' % i
101101 print ' %%aext%d = sext i8 %%acur%d to i32' % (i, i)
102102 print ' %%atest%d = icmp slt i32 %%aext%d, %d' % (i, i, i + 100)
103103 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
8181 for i in xrange(branch_blocks):
8282 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
8383 print 'before%d:' % i
84 print ' %%bcur%d = load i8 *%%stop' % i
84 print ' %%bcur%d = load i8 , i8 *%%stop' % i
8585 print ' %%bext%d = sext i8 %%bcur%d to i64' % (i, i)
8686 print ' %%btest%d = icmp slt i64 %%bext%d, %d' % (i, i, i + 50)
8787 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
9797 print ' store volatile i8 %d, i8 *%%ptr%d' % (value, i)
9898
9999 for i in xrange(branch_blocks):
100 print ' %%acur%d = load i8 *%%stop' % i
100 print ' %%acur%d = load i8 , i8 *%%stop' % i
101101 print ' %%aext%d = sext i8 %%acur%d to i64' % (i, i)
102102 print ' %%atest%d = icmp slt i64 %%aext%d, %d' % (i, i, i + 100)
103103 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
3939
4040 for i in xrange(branch_blocks - 1, -1, -1):
4141 print ' %%countptr%d = getelementptr i32 *%%counts, i64 %d' % (i, i)
42 print ' %%initcount%d = load i32 *%%countptr%d' % (i, i)
42 print ' %%initcount%d = load i32 , i32 *%%countptr%d' % (i, i)
4343 print ' br label %%loop%d' % i
4444
4545 print 'loop%d:' % i
4040
4141 for i in xrange(branch_blocks - 1, -1, -1):
4242 print ' %%countptr%d = getelementptr i64 *%%counts, i64 %d' % (i, i)
43 print ' %%initcount%d = load i64 *%%countptr%d' % (i, i)
43 print ' %%initcount%d = load i64 , i64 *%%countptr%d' % (i, i)
4444 print ' br label %%loop%d' % i
4545
4646 print 'loop%d:' % i
7878 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
7979 print 'before%d:' % i
8080 print ' %%bstop%d = getelementptr i8 *%%stop, i64 %d' % (i, i)
81 print ' %%bcur%d = load i8 *%%bstop%d' % (i, i)
81 print ' %%bcur%d = load i8 , i8 *%%bstop%d' % (i, i)
8282 print ' %%bext%d = sext i8 %%bcur%d to i32' % (i, i)
8383 print ' %%btest%d = icmp ult i32 %%limit, %%bext%d' % (i, i)
8484 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
9595
9696 for i in xrange(branch_blocks):
9797 print ' %%astop%d = getelementptr i8 *%%stop, i64 %d' % (i, i + 25)
98 print ' %%acur%d = load i8 *%%astop%d' % (i, i)
98 print ' %%acur%d = load i8 , i8 *%%astop%d' % (i, i)
9999 print ' %%aext%d = sext i8 %%acur%d to i32' % (i, i)
100100 print ' %%atest%d = icmp ult i32 %%limit, %%aext%d' % (i, i)
101101 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
8282 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
8383 print 'before%d:' % i
8484 print ' %%bstop%d = getelementptr i8 *%%stop, i64 %d' % (i, i)
85 print ' %%bcur%d = load i8 *%%bstop%d' % (i, i)
85 print ' %%bcur%d = load i8 , i8 *%%bstop%d' % (i, i)
8686 print ' %%bext%d = sext i8 %%bcur%d to i64' % (i, i)
8787 print ' %%btest%d = icmp ult i64 %%limit, %%bext%d' % (i, i)
8888 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
9999
100100 for i in xrange(branch_blocks):
101101 print ' %%astop%d = getelementptr i8 *%%stop, i64 %d' % (i, i + 25)
102 print ' %%acur%d = load i8 *%%astop%d' % (i, i)
102 print ' %%acur%d = load i8 , i8 *%%astop%d' % (i, i)
103103 print ' %%aext%d = sext i8 %%acur%d to i64' % (i, i)
104104 print ' %%atest%d = icmp ult i64 %%limit, %%aext%d' % (i, i)
105105 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
9797 for i in xrange(branch_blocks):
9898 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
9999 print 'before%d:' % i
100 print ' %%bcur%da = load i32 *%%stopa' % i
101 print ' %%bcur%db = load i32 *%%stopb' % i
100 print ' %%bcur%da = load i32 , i32 *%%stopa' % i
101 print ' %%bcur%db = load i32 , i32 *%%stopb' % i
102102 print ' %%bsub%d = sub i32 %%bcur%da, %%bcur%db' % (i, i, i)
103103 print ' %%btest%d = icmp ult i32 %%bsub%d, %d' % (i, i, i + 50)
104104 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
114114 print ' store volatile i8 %d, i8 *%%ptr%d' % (value, i)
115115
116116 for i in xrange(branch_blocks):
117 print ' %%acur%da = load i32 *%%stopa' % i
118 print ' %%acur%db = load i32 *%%stopb' % i
117 print ' %%acur%da = load i32 , i32 *%%stopa' % i
118 print ' %%acur%db = load i32 , i32 *%%stopb' % i
119119 print ' %%asub%d = sub i32 %%acur%da, %%acur%db' % (i, i, i)
120120 print ' %%atest%d = icmp ult i32 %%asub%d, %d' % (i, i, i + 100)
121121 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
9797 for i in xrange(branch_blocks):
9898 next = 'before%d' % (i + 1) if i + 1 < branch_blocks else 'main'
9999 print 'before%d:' % i
100 print ' %%bcur%da = load i64 *%%stopa' % i
101 print ' %%bcur%db = load i64 *%%stopb' % i
100 print ' %%bcur%da = load i64 , i64 *%%stopa' % i
101 print ' %%bcur%db = load i64 , i64 *%%stopb' % i
102102 print ' %%bsub%d = sub i64 %%bcur%da, %%bcur%db' % (i, i, i)
103103 print ' %%btest%d = icmp ult i64 %%bsub%d, %d' % (i, i, i + 50)
104104 print ' br i1 %%btest%d, label %%after0, label %%%s' % (i, next)
114114 print ' store volatile i8 %d, i8 *%%ptr%d' % (value, i)
115115
116116 for i in xrange(branch_blocks):
117 print ' %%acur%da = load i64 *%%stopa' % i
118 print ' %%acur%db = load i64 *%%stopb' % i
117 print ' %%acur%da = load i64 , i64 *%%stopa' % i
118 print ' %%acur%db = load i64 , i64 *%%stopb' % i
119119 print ' %%asub%d = sub i64 %%acur%da, %%acur%db' % (i, i, i)
120120 print ' %%atest%d = icmp ult i64 %%asub%d, %d' % (i, i, i + 100)
121121 print ' br i1 %%atest%d, label %%main, label %%after%d' % (i, i)
2525
2626 for i in range(count):
2727 print ' %%ptr%d = getelementptr i64 *%%base%d, i64 %d' % (i, i % 2, i / 2)
28 print ' %%val%d = load i64 *%%ptr%d' % (i, i)
28 print ' %%val%d = load i64 , i64 *%%ptr%d' % (i, i)
2929 print ''
3030
3131 print ' call void @foo()'
3737 count = 14
3838 for i in range(count):
3939 print ' %%ptr%d = getelementptr i64 *%%base, i64 %d' % (i, i / 2)
40 print ' %%val%d = load volatile i64 *%%ptr%d' % (i, i)
40 print ' %%val%d = load volatile i64 , i64 *%%ptr%d' % (i, i)
4141 print ''
4242
4343 # Encourage the register allocator to give preference to these %vals