Files
clang-p2996/bolt/test/X86/loop-nest.test
Maksim Panchenko d648aa1b8e [BOLT][TEST] Use double dash flags in tests
Replace a single dash with a double dash for options that have more
than a single letter.

llvm-bolt-wrapper.py has special treatment for output options such as
"-o" and "-w" causing issues when a single dash is used, e.g. for
"-write-dwp". The wrapper can be fixed as well, but using a double dash
has other advantages as well.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D127538
2022-06-10 16:27:33 -07:00

24 lines
1.1 KiB
Plaintext

# Verifies that llvm-bolt prints correct loop information.
RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
RUN: %p/Inputs/loop_nest.s -o %t.o
RUN: link_fdata %p/Inputs/loop_nest.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 -o %t --data=%t.fdata \
RUN: --print-cfg --print-loops --sequential-disassembly --lite=0 \
RUN: 2>&1 | FileCheck %s
CHECK: Binary Function "main{{.*}}" after building cfg
CHECK: Loop Info for Function "main{{.*}}"
CHECK: Outer loop header: .Ltmp[[#MAIN_OUTER_HDR:]]
CHECK-NEXT: Loop basic blocks: .Ltmp[[#MAIN_OUTER_HDR]], .Ltmp[[#]]
CHECK: Binary Function "foo" after building cfg
CHECK: Loop Info for Function "foo"
CHECK: Outer loop header: .Ltmp[[#FOO_OUTER_HDR:]]
CHECK-NEXT: Loop basic blocks: .Ltmp[[#FOO_OUTER_HDR]], .Ltmp[[#]], .LFT[[#]], .Ltmp[[#]], .Ltmp[[#FOO_INNER_HDR:]], .Ltmp[[#]], .Ltmp[[#FOO_INNER_BB:]]
CHECK: Nested loop header: .Ltmp[[#FOO_INNER_HDR]]
CHECK-NEXT: Loop basic blocks: .Ltmp[[#FOO_INNER_HDR]], .Ltmp[[#FOO_INNER_BB]]