Skip to content

Commit 8155507

Browse files
committed
Address comments
Created using spr 1.3.6-beta.1
1 parent bcebed6 commit 8155507

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

lld/ELF/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def build_id: J<"build-id=">, HelpText<"Generate build ID note">,
5959
MetaVarName<"[fast,md5,sha1,uuid,0x<hexstring>]">;
6060
def : F<"build-id">, Alias<build_id>, AliasArgs<["sha1"]>, HelpText<"Alias for --build-id=sha1">;
6161

62-
defm branch_to_branch: B<"branch-to-branch",
62+
defm branch_to_branch: BB<"branch-to-branch",
6363
"Enable branch-to-branch optimization (default at -O2)",
6464
"Disable branch-to-branch optimization (default at -O0 and -O1)">;
6565

lld/test/ELF/aarch64-branch-to-branch.s

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
# RUN: llvm-mc -filetype=obj -triple=aarch64-pc-linux %s -o %t.o
77
# RUN: ld.lld %t.o -o %t --branch-to-branch
8-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=B2B %s
8+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,B2B %s
99
# RUN: ld.lld %t.o -o %t -O2
10-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=B2B %s
10+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,B2B %s
1111

1212
## Test that branch-to-branch is disabled by default.
1313

1414
# RUN: ld.lld %t.o -o %t
15-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=NOB2B %s
15+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
1616
# RUN: ld.lld %t.o -o %t -O2 --no-branch-to-branch
17-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=NOB2B %s
17+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
1818

1919
## Test that branch-to-branch is disabled for preemptible symbols.
2020

2121
# RUN: ld.lld %t.o -o %t --branch-to-branch -shared
22-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=NOB2B %s
22+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
2323

2424
.section .rodata.vtable,"a"
2525
.globl vtable
@@ -34,6 +34,7 @@ vtable:
3434

3535
.section .text._start,"ax"
3636
.globl _start
37+
# CHECK: <_start>:
3738
_start:
3839
# B2B: bl {{.*}} <f3>
3940
# NOB2B: bl {{.*}} <f1{{.*}}>
@@ -49,7 +50,9 @@ b f2
4950

5051
.section .text.f2,"ax"
5152
.globl f2
53+
# CHECK: <f2>:
5254
f2:
55+
# CHECK-NEXT: b {{.*}} <f3{{.*}}>
5356
b f3
5457

5558
.section .text.f3,"ax"

lld/test/ELF/x86-64-branch-to-branch.s

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
77
# RUN: ld.lld %t.o -o %t --branch-to-branch
8-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=B2B %s
8+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,B2B %s
99
# RUN: ld.lld %t.o -o %t -O2
10-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=B2B %s
10+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,B2B %s
1111

1212
## Test that branch-to-branch is disabled by default.
1313

1414
# RUN: ld.lld %t.o -o %t
15-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=NOB2B %s
15+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
1616
# RUN: ld.lld %t.o -o %t -O2 --no-branch-to-branch
17-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=NOB2B %s
17+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
1818

1919
## Test that branch-to-branch is disabled for preemptible symbols.
2020

2121
# RUN: ld.lld %t.o -o %t --branch-to-branch -shared
22-
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefix=NOB2B %s
22+
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
2323

2424
.section .rodata.vtable,"a"
2525
.globl vtable
@@ -34,12 +34,13 @@ vtable:
3434

3535
.section .text._start,"ax"
3636
.globl _start
37+
# CHECK: <_start>:
3738
_start:
38-
# B2B: jmp {{.*}} <f3>
39-
# NOB2B: jmp {{.*}} <f1{{.*}}>
39+
# B2B-NEXT: jmp {{.*}} <f3>
40+
# NOB2B-NEXT: jmp {{.*}} <f1{{.*}}>
4041
jmp f1
41-
# B2B: jmp {{.*}} <f3>
42-
# NOB2B: jmp {{.*}} <f2{{.*}}>
42+
# B2B-NEXT: jmp {{.*}} <f3>
43+
# NOB2B-NEXT: jmp {{.*}} <f2{{.*}}>
4344
jmp f2
4445

4546
.section .text.f1,"ax"
@@ -49,7 +50,9 @@ jmp f2
4950

5051
.section .text.f2,"ax"
5152
.globl f2
53+
# CHECK: <f2>:
5254
f2:
55+
# CHECK-NEXT: jmp {{.*}} <f3{{.*}}>
5356
jmp f3
5457

5558
.section .text.f3,"ax"

0 commit comments

Comments
 (0)