Skip to content

Commit 502ec2e

Browse files
committed
[test] Make dwarf-loongarch-relocs.ll non-sensitive of function alignment
1 parent 33d804c commit 502ec2e

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

llvm/test/DebugInfo/LoongArch/dwarf-loongarch-relocs.ll

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
; RUN: llc --filetype=obj --mtriple=loongarch64 --mattr=-relax %s -o %t.o
22
; RUN: llvm-readobj -r %t.o | FileCheck --check-prefixes=RELOCS-BOTH,RELOCS-NORL %s
3-
; RUN: llvm-objdump --source %t.o | FileCheck --check-prefixes=SOURCE,SOURCE-NORL %s
4-
; RUN: llvm-dwarfdump --debug-info --debug-line %t.o | FileCheck --check-prefixes=DWARF,DWARF-NORL %s
3+
; RUN: llvm-objdump --source %t.o | FileCheck --check-prefix=SOURCE %s
4+
; RUN: llvm-dwarfdump --debug-info --debug-line %t.o | FileCheck --check-prefix=DWARF %s
55

6-
; RUN: llc --filetype=obj --mtriple=loongarch64 --mattr=+relax %s -o %t.r.o
6+
; RUN: llc --filetype=obj --mtriple=loongarch64 --mattr=+relax --align-all-functions=2 %s -o %t.r.o
77
; RUN: llvm-readobj -r %t.r.o | FileCheck --check-prefixes=RELOCS-BOTH,RELOCS-ENRL %s
8-
; RUN: llvm-objdump --source %t.r.o | FileCheck --check-prefixes=SOURCE,SOURCE-ENRL %s
9-
; RUN: llvm-dwarfdump --debug-info --debug-line %t.r.o | FileCheck --check-prefixes=DWARF,DWARF-ENRL %s
8+
; RUN: llvm-objdump --source %t.r.o | FileCheck --check-prefix=SOURCE %s
9+
; RUN: llvm-dwarfdump --debug-info --debug-line %t.r.o | FileCheck --check-prefix=DWARF %s
1010

1111
; RELOCS-BOTH: Relocations [
1212
; RELOCS-BOTH-NEXT: Section ({{.*}}) .rela.text {
13-
; RELOCS-NORL-NEXT: 0x14 R_LARCH_PCALA_HI20 sym 0x0
14-
; RELOCS-NORL-NEXT: 0x18 R_LARCH_PCALA_LO12 sym 0x0
15-
; RELOCS-ENRL-NEXT: 0x0 R_LARCH_ALIGN .Lla-relax-align0 0x5
16-
; RELOCS-ENRL-NEXT: 0x30 R_LARCH_PCALA_HI20 sym 0x0
17-
; RELOCS-ENRL-NEXT: 0x30 R_LARCH_RELAX - 0x0
18-
; RELOCS-ENRL-NEXT: 0x34 R_LARCH_PCALA_LO12 sym 0x0
19-
; RELOCS-ENRL-NEXT: 0x34 R_LARCH_RELAX - 0x0
13+
; RELOCS-BOTH-NEXT: 0x14 R_LARCH_PCALA_HI20 sym 0x0
14+
; RELOCS-ENRL-NEXT: 0x14 R_LARCH_RELAX - 0x0
15+
; RELOCS-BOTH-NEXT: 0x18 R_LARCH_PCALA_LO12 sym 0x0
16+
; RELOCS-ENRL-NEXT: 0x18 R_LARCH_RELAX - 0x0
2017
; RELOCS-BOTH-NEXT: }
2118
; RELOCS-BOTH: Section ({{.*}}) .rela.debug_frame {
2219
; RELOCS-NORL-NEXT: 0x1C R_LARCH_32 .debug_frame 0x0
@@ -39,8 +36,7 @@
3936
; RELOCS-BOTH-NEXT: }
4037
; RELOCS-BOTH-NEXT: ]
4138

42-
; SOURCE-NORL: 0000000000000000 <foo>:
43-
; SOURCE-ENRL: 000000000000001c <foo>:
39+
; SOURCE: 0000000000000000 <foo>:
4440
; SOURCE: ; {
4541
; SOURCE: ; asm volatile(
4642
; SOURCE: ; return 0;
@@ -91,16 +87,11 @@
9187
; DWARF-EMPTY:
9288
; DWARF-NEXT: Address Line Column File ISA Discriminator OpIndex Flags
9389
; DWARF-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------
94-
; DWARF-NORL-NEXT: 0x0000000000000000 2 0 0 0 0 0 is_stmt
95-
; DWARF-NORL-NEXT: 0x0000000000000010 3 3 0 0 0 0 is_stmt prologue_end
96-
; DWARF-NORL-NEXT: 0x0000000000000020 10 3 0 0 0 0 is_stmt
97-
; DWARF-NORL-NEXT: 0x000000000000002c 10 3 0 0 0 0 epilogue_begin
98-
; DWARF-NORL-NEXT: 0x0000000000000034 10 3 0 0 0 0 end_sequence
99-
; DWARF-ENRL-NEXT: 0x000000000000001c 2 0 0 0 0 0 is_stmt
100-
; DWARF-ENRL-NEXT: 0x000000000000002c 3 3 0 0 0 0 is_stmt prologue_end
101-
; DWARF-ENRL-NEXT: 0x000000000000003c 10 3 0 0 0 0 is_stmt
102-
; DWARF-ENRL-NEXT: 0x0000000000000048 10 3 0 0 0 0 epilogue_begin
103-
; DWARF-ENRL-NEXT: 0x0000000000000050 10 3 0 0 0 0 end_sequence
90+
; DWARF-NEXT: 0x0000000000000000 2 0 0 0 0 0 is_stmt
91+
; DWARF-NEXT: 0x0000000000000010 3 3 0 0 0 0 is_stmt prologue_end
92+
; DWARF-NEXT: 0x0000000000000020 10 3 0 0 0 0 is_stmt
93+
; DWARF-NEXT: 0x000000000000002c 10 3 0 0 0 0 epilogue_begin
94+
; DWARF-NEXT: 0x0000000000000034 10 3 0 0 0 0 end_sequence
10495

10596
; ModuleID = 'dwarf-loongarch-relocs.c'
10697
source_filename = "dwarf-loongarch-relocs.c"

0 commit comments

Comments
 (0)