Skip to content

[BOLT][test] Replace /dev/null with temp file #73485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bolt/test/AArch64/got-ld64-relaxation.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// to the ADR+ADD sequence is properly recognized and handled by bolt

// RUN: yaml2obj %p/Inputs/got-ld64-relaxation.yaml &> %t.exe
// RUN: llvm-bolt %t.exe -o /dev/null --print-fix-relaxations \
// RUN: llvm-bolt %t.exe -o %t.null --print-fix-relaxations \
// RUN: --print-only=main | FileCheck %s

// CHECK: adrp x0, foo
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/AArch64/skip-got-rel.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
// normally.

RUN: yaml2obj %p/Inputs/skip-got-rel.yaml &> %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --print-cfg --print-only=_start | FileCheck %s
RUN: llvm-bolt %t.exe -o %t.null --print-cfg --print-only=_start | FileCheck %s

CHECK: adr x0, foo2
2 changes: 1 addition & 1 deletion bolt/test/RISCV/branch-no-secondary-entry.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Test that no secondary entry points are created for basic block labels used
/// by branches.
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt -print-cfg -o /dev/null %t 2>&1 | FileCheck %s
// RUN: llvm-bolt -print-cfg -o %t.null %t 2>&1 | FileCheck %s

// CHECK: Binary Function "_start" after building cfg {
// CHECK: IsMultiEntry: 0
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/call-annotations.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// RUN: llvm-mc -triple riscv64 -mattr=+c -filetype obj -o %t.o %s
// RUN: ld.lld --emit-relocs -o %t %t.o
// RUN: llvm-bolt --enable-bat --print-cfg --print-fix-riscv-calls \
// RUN: -o /dev/null %t | FileCheck %s
// RUN: -o %t.null %t | FileCheck %s

.text
.option norvc
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/load-store.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang %cflags -o %t %s
// RUN: link_fdata --no-lbr %s %t %t.fdata
// RUN: llvm-bolt %t -o /dev/null --data=%t.fdata --dyno-stats | FileCheck %s
// RUN: llvm-bolt %t -o %t.null --data=%t.fdata --dyno-stats | FileCheck %s

// CHECK: BOLT-INFO: program-wide dynostats after all optimizations before SCTC and FOP (no change):
// CHECK: 3000 : executed instructions
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-abs.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -Wl,--defsym='__global_pointer$'=0x2800 -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.data
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-bb-split.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.data
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-branch.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.text
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-call.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-fix-riscv-calls --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-fix-riscv-calls --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.text
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-got.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.data
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-jal.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.text
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-lohi.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: llvm-mc -triple riscv64 -filetype=obj -o %t.o %s
// RUN: ld.lld -q -o %t %t.o
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.data
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-pcrel.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.data
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-rvc-branch.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.text
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-rvc-jump.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %cflags -o %t %s
// RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
// RUN: | FileCheck %s

.text
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/RISCV/reloc-tls.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: llvm-mc -triple riscv64 -filetype obj -o %t.o %s
// RUN: ld.lld --emit-relocs -o %t %t.o
// RUN: llvm-bolt --print-cfg --print-only=tls_le,tls_ie -o /dev/null %t \
// RUN: llvm-bolt --print-cfg --print-only=tls_le,tls_ie -o %t.null %t \
// RUN: | FileCheck %s

// CHECK-LABEL: Binary Function "tls_le{{.*}}" after building cfg {
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/block-reordering.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# according to the new function layout.

RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata \
RUN: llvm-bolt %t.exe -o %t.null --data %p/Inputs/blarge.fdata \
RUN: --reorder-blocks=normal --print-finalized 2>&1 | FileCheck %s \
RUN: --check-prefix=CHECK

Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/branch-data.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Also checks that llvm-bolt disassembler and CFG builder is working properly.

RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata --print-cfg | FileCheck %s
RUN: llvm-bolt %t.exe -o %t.null --data %p/Inputs/blarge.fdata --print-cfg | FileCheck %s

CHECK: Binary Function "usqrt"
CHECK: State : CFG constructed
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/bug-function-layout-execount.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# RUN: link_fdata %s %t.o %t.fdata
# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
# RUN: llvm-bolt %t.exe --data %t.fdata --lite --reorder-functions=exec-count \
# RUN: -v=2 --debug-only=hfsort -o /dev/null 2>&1 | FileCheck %s
# RUN: -v=2 --debug-only=hfsort -o %t.null 2>&1 | FileCheck %s

# CHECK: Starting pass: reorder-functions
# CHECK-NEXT: hot func func2 (1500)
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/call-zero.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
# RUN: %clang %cflags %t.o -o %t.exe
# RUN: llvm-bolt %t.exe -o /dev/null -v=2 2>&1 | FileCheck %s
# RUN: llvm-bolt %t.exe -o %t.null -v=2 2>&1 | FileCheck %s
# CHECK: Function main has a call to address zero.

.text
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/cfi-instrs-count.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
# RUN: %clang %cflags %t.o -o %t.exe
# RUN: llvm-bolt %t.exe -o /dev/null --print-cfg 2>&1 | FileCheck %s
# RUN: llvm-bolt %t.exe -o %t.null --print-cfg 2>&1 | FileCheck %s
#
# CHECK: Binary Function "_Z7catchitv" after building cfg {
# CHECK: CFI Instrs : 6
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/checkvma-large-section.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
REQUIRES: asserts
RUN: split-file %s %t
RUN: yaml2obj %t/yaml -o %t.exe --max-size=0
RUN: llvm-bolt %t.exe -o /dev/null --allow-stripped
RUN: llvm-bolt %t.exe -o %t.null --allow-stripped
#--- yaml
--- !ELF
FileHeader:
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/data-to-data-pcrel.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# RUN: llvm-strip --strip-unneeded %t.o
# RUN: ld.lld %t.o -o %t.exe -q --unresolved-symbols=ignore-all
# RUN: llvm-readelf -Wr %t.exe | FileCheck %s
# RUN: llvm-bolt --strict %t.exe --relocs -o /dev/null
# RUN: llvm-bolt --strict %t.exe --relocs -o %t.null

.text
.globl _start
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/double-rel.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
# RUN: ld.lld %t.o -o %t.exe -q --Tdata=0x80000
# RUN: llvm-bolt %t.exe --relocs -o /dev/null --print-only=_start --print-disasm \
# RUN: llvm-bolt %t.exe --relocs -o %t.null --print-only=_start --print-disasm \
# RUN: | FileCheck %s --check-prefix=CHECK-BOLT
# RUN: llvm-objdump -d --print-imm-hex %t.exe \
# RUN: | FileCheck %s --check-prefix=CHECK-OBJDUMP
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/exceptions-args.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RUN: %clang %cflags %p/../Inputs/stub.c -fPIC -pie -shared -o %t.so
RUN: %clangxx %cxxflags -no-pie %p/Inputs/exc_args.s -o %t %t.so -Wl,-z,notext
RUN: llvm-bolt %t -o /dev/null --print-finalized --print-only=main | FileCheck %s
RUN: llvm-bolt %t -o %t.null --print-finalized --print-only=main | FileCheck %s

CHECK: Binary Function "main" after finalize-functions
CHECK: callq _Z3fooiiiiiiii {{.*}} GNU_args_size = 16
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/fptr-addend-pcrel.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
# RUN: llvm-strip --strip-unneeded %t.o
# RUN: ld.lld %t.o -o %t.exe -q
# RUN: llvm-bolt %t.exe --relocs -o /dev/null --print-only=foo --print-disasm \
# RUN: llvm-bolt %t.exe --relocs -o %t.null --print-only=foo --print-disasm \
# RUN: | FileCheck %s

.text
Expand Down
4 changes: 2 additions & 2 deletions bolt/test/X86/gotpcrelx.s
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# RUN: ld.lld %t.o -o %t.no-relax.exe -q --no-relax
# RUN: llvm-bolt %t.exe --relocs -o %t.out --print-cfg --print-only=_start \
# RUN: |& FileCheck --check-prefix=BOLT %s
# RUN: llvm-bolt %t.pie.exe -o /dev/null --print-cfg --print-only=_start \
# RUN: llvm-bolt %t.pie.exe -o %t.null --print-cfg --print-only=_start \
# RUN: |& FileCheck --check-prefix=PIE-BOLT %s
# RUN: llvm-bolt %t.no-relax.exe -o /dev/null --print-cfg --print-only=_start \
# RUN: llvm-bolt %t.no-relax.exe -o %t.null --print-cfg --print-only=_start \
# RUN: |& FileCheck --check-prefix=NO-RELAX-BOLT %s
# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex \
# RUN: %t.out | FileCheck --check-prefix=DISASM %s
Expand Down
4 changes: 2 additions & 2 deletions bolt/test/X86/icp-inline.s
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Without -icp-inline option, ICP is performed
# RUN: llvm-bolt %t.exe --icp=calls --icp-calls-topn=1 --inline-small-functions\
# RUN: -o /dev/null --lite=0 \
# RUN: -o %t.null --lite=0 \
# RUN: --inline-small-functions-bytes=4 --print-icp --data %t.fdata \
# RUN: | FileCheck %s --check-prefix=CHECK-NO-ICP-INLINE
# CHECK-NO-ICP-INLINE: Binary Function "main" after indirect-call-promotion
Expand All @@ -29,7 +29,7 @@

# With -icp-inline option, ICP is not performed (size of bar > inline threshold)
# RUN: llvm-bolt %t.exe --icp=calls --icp-calls-topn=1 --inline-small-functions\
# RUN: -o /dev/null --lite=0 \
# RUN: -o %t.null --lite=0 \
# RUN: --inline-small-functions-bytes=4 --icp-inline --print-icp \
# RUN: --data %t.fdata | FileCheck %s --check-prefix=CHECK-ICP-INLINE
# CHECK-ICP-INLINE: Binary Function "main" after indirect-call-promotion
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/indirect-goto.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check llvm-bolt processes binaries compiled from sources that use indirect goto.
RUN: %clang %cflags -no-pie %S/Inputs/indirect_goto.c -Wl,-q -o %t
RUN: llvm-bolt %t -o /dev/null --relocs=1 --print-cfg --print-only=main \
RUN: llvm-bolt %t -o %t.null --relocs=1 --print-cfg --print-only=main \
RUN: --strict \
RUN: 2>&1 | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/is-strip.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# RUN: llvm-bolt %t -o %t.out 2>&1 | FileCheck %s -check-prefix=CHECK-NOSTRIP
# RUN: cp %t %t.stripped
# RUN: llvm-strip -s %t.stripped
# RUN: not llvm-bolt %t.stripped -o /dev/null 2>&1 | FileCheck %s -check-prefix=CHECK-STRIP
# RUN: not llvm-bolt %t.stripped -o %t.null 2>&1 | FileCheck %s -check-prefix=CHECK-STRIP
# RUN: llvm-bolt %t.stripped -o %t.out --allow-stripped 2>&1 | FileCheck %s -check-prefix=CHECK-NOSTRIP

# CHECK-NOSTRIP-NOT: BOLT-ERROR: stripped binaries are not supported.
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/jmpjmp.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %S/Inputs/jmpjmp.s -o %t.o
RUN: %clang %cflags %t.o -o %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --print-cfg 2>&1 | FileCheck %s
RUN: llvm-bolt %t.exe -o %t.null --print-cfg 2>&1 | FileCheck %s

CHECK: Binary Function "testfunc"
CHECK: State : CFG constructed
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/jump-table-footprint-reduction.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN: %S/Inputs/jump_table_footprint_reduction.s -o %t.o
RUN: link_fdata %S/Inputs/jump_table_footprint_reduction.s %t.o %t.fdata --nmtool llvm-nm
RUN: llvm-strip --strip-unneeded %t.o
RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q
RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null \
RUN: llvm-bolt %t.exe --data %t.fdata -o %t.null \
RUN: --jump-tables=move --jt-footprint-reduction --assume-abi --relocs \
RUN: | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/jump-table-pic-order.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# in the same order as they appear in the input code.

RUN: %clang %cflags %S/Inputs/jump-table-pic.s -o %t.exe -Wl,-q
RUN: llvm-bolt %t.exe --strict --print-cfg --print-only=main -o /dev/null \
RUN: llvm-bolt %t.exe --strict --print-cfg --print-only=main -o %t.null \
RUN: | FileCheck %s

CHECK: BB Layout : {{.*, .*, .*,}} [[BB4to6:.*, .*, .*]]
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/jump-table-reference.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verifies that BOLT detects fixed destination of indirect jump

RUN: %clang %cflags -no-pie %S/Inputs/jump_table_reference.s -Wl,-q -o %t
RUN: llvm-bolt %t --relocs -o /dev/null 2>&1 | FileCheck %s
RUN: llvm-bolt %t --relocs -o %t.null 2>&1 | FileCheck %s

CHECK: BOLT-INFO: fixed indirect branch detected in main
2 changes: 1 addition & 1 deletion bolt/test/X86/layout-heuristic.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Also checks that llvm-bolt disassembler and CFG builder is working properly.

RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata \
RUN: llvm-bolt %t.exe -o %t.null --data %p/Inputs/blarge.fdata \
RUN: --reorder-blocks=normal --print-cfg --print-reordered \
RUN: --funcs=main,SolveCubic,usqrt --sequential-disassembly \
RUN: 2>&1 | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/line-number.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Verifies that the extraction of DWARF line number information is correct.

RUN: %clangxx %cxxflags %S/Inputs/linenumber.cpp -g -o %t
RUN: llvm-bolt %t -o /dev/null --print-reordered --update-debug-sections \
RUN: llvm-bolt %t -o %t.null --print-reordered --update-debug-sections \
RUN: --print-debug-info --reorder-blocks=reverse --sequential-disassembly \
RUN: 2>&1 | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/lto-name-match.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# RUN: link_fdata %s %t.o %t.fdata
# RUN: llvm-strip --strip-unneeded %t.o
# RUN: %clang %cflags %t.o -o %t.exe
# RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null | FileCheck %s
# RUN: llvm-bolt %t.exe --data %t.fdata -o %t.null | FileCheck %s

## Check that profile is correctly matched by functions with variable suffixes.
## E.g., LTO-generated name foo.llvm.123 should match foo.llvm.*.
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/no-entry-reordering.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %S/Inputs/entry.s -o %
RUN: link_fdata %S/Inputs/entry.s %t.o %t.fdata --nmtool llvm-nm
RUN: llvm-strip --strip-unneeded %t.o
RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null --reorder-blocks=normal \
RUN: llvm-bolt %t.exe --data %t.fdata -o %t.null --reorder-blocks=normal \
RUN: --funcs=_start --print-reordered --sequential-disassembly | FileCheck %s

CHECK: BB Layout : .LBB00, {{.*}}
2 changes: 1 addition & 1 deletion bolt/test/X86/pt_gnu_relro.s
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# READELF: Section to Segment mapping:
# READELF: 04 .got

# RUN: llvm-bolt %t.exe --relocs -o /dev/null -v=1 \
# RUN: llvm-bolt %t.exe --relocs -o %t.null -v=1 \
# RUN: |& FileCheck --check-prefix=BOLT %s
# BOLT: BOLT-INFO: marking .got as GNU_RELRO

Expand Down
4 changes: 2 additions & 2 deletions bolt/test/X86/reader-stale-yaml.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
# Testing "usqrt"
RUN: llvm-bolt %t.exe -o /dev/null --b %p/Inputs/blarge_profile_stale.yaml \
RUN: llvm-bolt %t.exe -o %t.null --b %p/Inputs/blarge_profile_stale.yaml \
RUN: --print-cfg --print-only=usqrt --infer-stale-profile=1 \
RUN: --profile-ignore-hash=1 --profile-use-dfs=0 2>&1 | FileCheck %s -check-prefix=CHECK1
# Testing "SolveCubic"
RUN: llvm-bolt %t.exe -o /dev/null --b %p/Inputs/blarge_profile_stale.yaml \
RUN: llvm-bolt %t.exe -o %t.null --b %p/Inputs/blarge_profile_stale.yaml \
RUN: --print-cfg --print-only=SolveCubic --infer-stale-profile=1 \
RUN: --profile-ignore-hash=1 --profile-use-dfs=0 2>&1 | FileCheck %s -check-prefix=CHECK2

Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/reader.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This script checks that DataReader in llvm-bolt is reading data correctly

RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata --dump-data \
RUN: llvm-bolt %t.exe -o %t.null --data %p/Inputs/blarge.fdata --dump-data \
RUN: 2>&1 | sort | FileCheck %s -check-prefix=CHECK

CHECK: main 1105 SolveCubic 0 0 151
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/sctc-bug.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that we don't accidentally optimize out a tail call.

RUN: %clang %cflags %S/Inputs/sctc_bug.s -o %t
RUN: llvm-bolt %t -o /dev/null --funcs=main --print-after-lowering \
RUN: llvm-bolt %t -o %t.null --funcs=main --print-after-lowering \
RUN: 2>&1 | FileCheck %s

CHECK: jp .L{{.*}}
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/sctc-bug2.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that conditional tail call is not treated as a regular tail call by SCTC.

RUN: %clang %cflags %S/Inputs/sctc_bug2.s -o %t
RUN: llvm-bolt %t -o /dev/null --funcs=main --print-after-lowering \
RUN: llvm-bolt %t -o %t.null --funcs=main --print-after-lowering \
RUN: --sequential-disassembly 2>&1 | FileCheck %s

CHECK: .LFT1
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/sctc-bug3.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that we don't accidentally optimize out a tail call.

RUN: %clang %cflags %S/Inputs/sctc_bug3.s -o %t
RUN: llvm-bolt %t -o /dev/null --funcs=main --print-after-lowering \
RUN: llvm-bolt %t -o %t.null --funcs=main --print-after-lowering \
RUN: --sequential-disassembly 2>&1 | FileCheck %s

CHECK: .LBB00 (1 instructions, align : 1)
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/sctc-bug4.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that fallthrough blocks are handled properly.

RUN: %clang %cflags %S/Inputs/sctc_bug4.s -o %t
RUN: llvm-bolt %t -o /dev/null \
RUN: llvm-bolt %t -o %t.null \
RUN: -funcs=test_func -print-sctc -sequential-disassembly 2>&1 | FileCheck %s

CHECK: .Ltmp2 (3 instructions, align : 1)
Expand Down
Loading