[ARM] More MVE compare vector splat combines for ANDs
[llvm-complete.git] / test / CodeGen / SystemZ / Large / spill-01.py
blob2831804df9e575a06b87fbc4540fa535aed85b30
1 # Test cases where MVC is used for spill slots that end up being out of range.
2 # RUN: python %s | llc -mtriple=s390x-linux-gnu | FileCheck %s
4 # There are 8 usable call-saved GPRs, two of which are needed for the base
5 # registers. The first 160 bytes of the frame are needed for the ABI
6 # call frame, and a further 8 bytes are needed for the emergency spill slot.
7 # That means we will have at least one out-of-range slot if:
9 # count == (4096 - 168) / 8 + 6 + 1 == 498
11 # Add in some extra room and check both %r15+4096 (the first out-of-range slot)
12 # and %r15+4104.
14 # CHECK: f1:
15 # CHECK: lay [[REG:%r[0-5]]], 4096(%r15)
16 # CHECK: mvc 0(8,[[REG]]), {{[0-9]+}}({{%r[0-9]+}})
17 # CHECK: brasl %r14, foo@PLT
18 # CHECK: lay [[REG:%r[0-5]]], 4096(%r15)
19 # CHECK: mvc {{[0-9]+}}(8,{{%r[0-9]+}}), 8([[REG]])
20 # CHECK: br %r14
22 from __future__ import print_function
24 count = 500
26 print('declare void @foo()')
27 print('')
28 print('define void @f1(i64 *%base0, i64 *%base1) {')
30 for i in range(count):
31 print(' %%ptr%d = getelementptr i64, i64 *%%base%d, i64 %d' % (i, i % 2, i / 2))
32 print(' %%val%d = load i64 , i64 *%%ptr%d' % (i, i))
33 print('')
35 print(' call void @foo()')
36 print('')
38 for i in range(count):
39 print(' store i64 %%val%d, i64 *%%ptr%d' % (i, i))
41 print('')
42 print(' ret void')
43 print('}')