test: remove lit tests

This commit is contained in:
Sebastien Bourdeauducq 2022-06-06 22:45:36 +08:00
parent 0607743669
commit cb68ed9f1d
4 changed files with 0 additions and 143 deletions

View File

@ -1,30 +0,0 @@
# RUN: env ARTIQ_DUMP_LLVM=%t %python -m artiq.compiler.testbench.embedding +compile %s
# RUN: OutputCheck %s --file-to-check=%t.ll
from artiq.language.core import *
from artiq.language.types import *
# Make sure `byval` and `sret` are specified both at the call site and the
# declaration. This isn't caught by the LLVM IR validator, but mismatches
# lead to miscompilations (at least in LLVM 11).
@kernel
def entrypoint():
# CHECK: call void @accept_str\({ i8\*, i32 }\* nonnull byval
accept_str("foo")
# CHECK: call void @return_str\({ i8\*, i32 }\* nonnull sret
return_str()
# CHECK: declare void @accept_str\({ i8\*, i32 }\* byval\)
@syscall
def accept_str(name: TStr) -> TNone:
pass
# CHECK: declare void @return_str\({ i8\*, i32 }\* sret\)
@syscall
def return_str() -> TStr:
pass

View File

@ -1,42 +0,0 @@
# RUN: %python -m artiq.compiler.testbench.jit %s >%t
# RUN: OutputCheck %s --file-to-check=%t
# REQUIRES: exceptions
def run():
loop = 0
print("start")
try:
while True:
print("loop")
try:
if loop == 0:
loop += 1
continue
func()
break
except RuntimeError:
print("except")
return False
finally:
print("finally2")
print("after-while")
finally:
print("finally1")
print("exit")
return True
def func():
print("func")
# CHECK-L: start
# CHECK-NEXT-L: loop
# CHECK-NEXT-L: finally2
# CHECK-NEXT-L: loop
# CHECK-NEXT-L: func
# CHECK-NEXT-L: finally2
# CHECK-NEXT-L: after-while
# CHECK-NEXT-L: finally1
# CHECK-NEXT-L: exit
run()

View File

@ -1,42 +0,0 @@
# RUN: %python -m artiq.compiler.testbench.jit %s >%t
# RUN: OutputCheck %s --file-to-check=%t
# REQUIRES: exceptions
def run():
print("start")
try:
try:
while True:
print("loop")
try:
print("try")
func()
print("unreachable")
return True
except RuntimeError:
print("except1")
raise
print("unreachable")
finally:
print("finally1")
print("unreachable")
return False
except RuntimeError:
print("except2")
raise
finally:
print("finally2")
return True
def func():
raise RuntimeError("Test")
# CHECK-L: start
# CHECK-NEXT-L: loop
# CHECK-NEXT-L: try
# CHECK-NEXT-L: except1
# CHECK-NEXT-L: finally1
# CHECK-NEXT-L: except2
# CHECK-NEXT-L: finally2
run()

View File

@ -1,29 +0,0 @@
# RUN: %python -m artiq.compiler.testbench.jit %s >%t
# RUN: OutputCheck %s --file-to-check=%t
# REQUIRES: exceptions
def run():
try:
while True:
try:
print("try")
func()
return True
except RuntimeError:
print("except")
return False
print("unreachable")
finally:
print("finally")
print("unreachable")
return False
def func():
pass
# CHECK-L: try
# CHECK-NOT-L: except
# CHECK-NOT-L: unreachable
# CHECK-L: finally
run()