llvm.org GIT mirror llvm / 4448b5e
[GlobalISel][X86] G_BR instruction select test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303036 91177308-0d34-0410-b5e6-96231b3b80d8 Igor Breger 3 years ago
2 changed file(s) with 58 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1 ; RUN: llc -O0 -mtriple=x86_64-linux-gnu -global-isel %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=X64
2
3 define void @uncondbr() {
4 ; CHECK-LABEL: uncondbr:
5 ; CHECK: # BB#1: # %entry
6 ; CHECK-NEXT: jmp .LBB0_3
7 ; CHECK-NEXT: .LBB0_2: # %end
8 ; CHECK-NEXT: retq
9 ; CHECK-NEXT: .LBB0_3: # %bb2
10 ; CHECK-NEXT: jmp .LBB0_2
11 entry:
12 br label %bb2
13 end:
14 ret void
15 bb2:
16 br label %end
17 }
18
0 # RUN: llc -mtriple=x86_64-linux-gnu -global-isel -run-pass=instruction-select %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=X64
1 # RUN: llc -mtriple=i386-linux-gnu -global-isel -run-pass=instruction-select %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=X32
2
3 --- |
4 define void @uncondbr() {
5 entry:
6 br label %bb2
7
8 end: ; preds = %bb2
9 ret void
10
11 bb2: ; preds = %entry
12 br label %end
13 }
14
15 ...
16 ---
17 name: uncondbr
18 # CHECK-LABEL: name: uncondbr
19 alignment: 4
20 legalized: true
21 regBankSelected: true
22 # CHECK: JMP_1 %bb.2.bb2
23 # CHECK: JMP_1 %bb.1.end
24 body: |
25 bb.1.entry:
26 successors: %bb.3.bb2(0x80000000)
27
28 G_BR %bb.3.bb2
29
30 bb.2.end:
31 RET 0
32
33 bb.3.bb2:
34 successors: %bb.2.end(0x80000000)
35
36 G_BR %bb.2.end
37
38 ...