[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / loop-inversion-pass.s
blobcb241110cf70db428c3148d8cc2b4f95d19e2b25
1 # REQUIRES: system-linux
3 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
4 # RUN: %s -o %t.o
5 # RUN: link_fdata %s %t.o %t.fdata
6 # RUN: link_fdata %s %t.o %t.fdata2 "FDATA2"
7 # RUN: link_fdata %s %t.o %t.fdata3 "FDATA3"
8 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
9 # RUN: llvm-bolt %t.exe --data %t.fdata --reorder-blocks=ext-tsp \
10 # RUN: --print-finalized --loop-inversion-opt -o %t.out \
11 # RUN: | FileCheck %s
12 # RUN: llvm-bolt %t.exe --data %t.fdata2 --reorder-blocks=ext-tsp \
13 # RUN: --print-finalized --loop-inversion-opt -o %t.out2 \
14 # RUN: | FileCheck --check-prefix="CHECK2" %s
15 # RUN: llvm-bolt %t.exe --data %t.fdata3 --reorder-blocks=none \
16 # RUN: --print-finalized --loop-inversion-opt -o %t.out3 \
17 # RUN: | FileCheck --check-prefix="CHECK3" %s
19 # The case where the loop is used:
20 # FDATA: 1 main 2 1 main #.J1# 0 420
21 # FDATA: 1 main b 1 main #.Jloop# 0 420
22 # FDATA: 1 main b 1 main d 0 1
23 # CHECK: BB Layout : .LBB00, .Ltmp0, .Ltmp1, .LFT0
25 # The case where the loop is unused:
26 # FDATA2: 1 main 2 1 main #.J1# 0 420
27 # FDATA2: 1 main b 1 main #.Jloop# 0 1
28 # FDATA2: 1 main b 1 main d 0 420
29 # CHECK2: BB Layout : .LBB00, .Ltmp1, .LFT0, .Ltmp0
31 # The case where the loop does not require rotation:
32 # FDATA3: 1 main 2 1 main #.J1# 0 420
33 # FDATA3: 1 main b 1 main #.Jloop# 0 420
34 # FDATA3: 1 main b 1 main d 0 1
35 # CHECK3: BB Layout : .LBB00, .Ltmp0, .Ltmp1, .LFT0
37 .text
38 .globl main
39 .type main, %function
40 .size main, .Lend-main
41 main:
42 xor %eax, %eax
43 jmp .J1
44 .Jloop:
45 inc %rax
46 .J1:
47 cmp $16, %rax
48 jl .Jloop
49 retq
51 # For relocations against .text
52 call exit
53 .Lend: