File: file-output-type.test

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (49 lines) | stat: -rw-r--r-- 2,497 bytes parent folder | download | duplicates (10)
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
49
# REQUIRES: default_triple
# RUN: rm -rf %t.dir && mkdir %t.dir  && cd %t.dir

# 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