xref: /llvm-project/llvm/test/tools/llvm-reduce/Inputs/remove-instructions.py (revision b71edfaa4ec3c998aadb35255ce2f60bba2940b0)
1import sys
2
3InterestingInstructions = 0
4
5input = open(sys.argv[1], "r")
6for line in input:
7    i = line.find(";")
8    if i >= 0:
9        line = line[:i]
10    if "%interesting" in line:
11        InterestingInstructions += 1
12    print(InterestingInstructions)
13
14if InterestingInstructions == 5:
15    sys.exit(0)  # interesting!
16
17sys.exit(1)
18