brintos

brintos / llvm-project-archived public Read only

0
0
Text · 751 B · 86d3af1 Raw
31 lines · python
1# Test code generation for retrieving function descriptors2# from the ADA when the ADA is extremely large and forces the3# generation of a different instruction sequence4# RUN: %python %s | llc -mtriple=s390x-ibm-zos -O2 | FileCheck %s5 6# CHECK: llilf	1,{{[0-9]+}}7# CHECK-NEXT: la	1,0(1,8)8 9from __future__ import print_function10 11num_calls = 3500012 13print("define hidden signext i32 @main() {")14print("entry:")15 16for i in range(num_calls):17    print("  call void @foo%d()" % i)18 19print("  call void @bar(ptr noundef @foo)")20print("ret i32 0")21print("}")22 23for i in range(num_calls):24    print("declare void @foo%d(...)" % i)25 26print("declare void @bar(ptr noundef)")27print("define internal void @foo() {")28print("entry:")29print("  ret void")30print("  }")31