File: file-output-type.test

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (48 lines) | stat: -rw-r--r-- 2,454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# RUN: rm -f reduced.ll reduced.bc

# RUN: llvm-as -o test-output-format.bc %p/Inputs/test-output-format.ll

# A .ll input file should default to text output in reduced.ll
# RUN: llvm-reduce --delta-passes=instructions --test FileCheck --test-arg %s --test-arg --input-file %p/Inputs/test-output-format.ll
# RUN: llvm-as -disable-output reduced.ll


# A .bc input file should default to bitcode output, in reduced.bc (with bitcode intermediates)
# RUN: rm -f reduced.ll reduced.bc
# RUN: llvm-reduce --delta-passes=instructions --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg %s test-output-format.bc
# RUN: llvm-dis -disable-output reduced.bc


# A .bc input file with a requested .bc output should produce bitcode
# RUN: llvm-reduce --delta-passes=instructions -o %t.0.bc --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg %s test-output-format.bc
# RUN: llvm-dis -disable-output %t.0.bc


# A .bc input file with a requested .ll output
# RUN: rm -f reduced.ll reduced.bc
# RUN: llvm-reduce --delta-passes=instructions -o %t.0.ll --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg %s test-output-format.bc
# RUN: llvm-dis -disable-output %t.0.ll


# A file name ending in .bc
# RUN: llvm-reduce -o %t.1.bc --delta-passes=instructions --test FileCheck --test-arg %s --test-arg --input-file %p/Inputs/test-output-format.ll
# RUN: llvm-as -disable-output %t.1.bc


# Make sure an explicit -output-bitcode produces bitcode output regardless of suffix
# RUN: llvm-reduce -output-bitcode -o %t.2_no_suffix --delta-passes=instructions --test FileCheck --test-arg %s --test-arg --input-file %p/Inputs/test-output-format.ll
# RUN: llvm-dis -disable-output %t.2_no_suffix


# Make sure an explicit -output-bitcode overrides .ll suffix
# RUN: llvm-reduce -output-bitcode -o %t.2.ll --delta-passes=instructions --test FileCheck --test-arg %s --test-arg --input-file %p/Inputs/test-output-format.ll
# RUN: llvm-dis -disable-output %t.2.ll


# Make sure MIR ignores requests for bitcode
# RUN: llvm-reduce -output-bitcode --delta-passes=instructions -o %t.3 --test FileCheck --test-arg --check-prefix=MIR --test-arg %s --test-arg --input-file %p/Inputs/test-output-format.mir
# RUN: llc -x mir -run-pass=none -o /dev/null %t.3


# CHECK: store i32 0
# MIR: G_CONSTANT i32 0