[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / hexagon-jump-error.s
blobad8ddbf8ede5b9d36776f7cedf6b24c82d2ae5d1
1 # REQUIRES: hexagon
2 # RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t.o
3 # RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck --implicit-check-not "out of range" %s
5 .globl _start
6 .type _start, @function
7 _start:
9 # CHECK: relocation R_HEX_B9_PCREL out of range: 1028 is not in [-1024, 1023]
10 {r0 = #0; jump #1f}
11 .space (1<<10)
12 .section b9, "ax"
15 # CHECK: relocation R_HEX_B13_PCREL out of range: 16388 is not in [-16384, 16383]
16 if (r0==#0) jump:t #1f
17 .space (1<<14)
18 .section b13, "ax"
21 # CHECK: relocation R_HEX_B15_PCREL out of range: 65540 is not in [-65536, 65535]
22 if (p0) jump #1f
23 .space (1<<16)
24 .section b15, "ax"
27 # CHECK: relocation R_HEX_B22_PCREL out of range: 8388612 is not in [-2097152, 2097151]
28 jump #1f
29 .space (1<<23)
30 .section b22, "ax"