[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / Mips / got-rel-expr.s
blob8e77658c24ad9faf425fbce950760a71c969eb56
1 # Check that llvm-mc accepts arithmetic expression
2 # as an argument of the %got relocation.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s \
5 # RUN: | llvm-objdump -d -r - | FileCheck %s
7 .text
8 foo:
9 lw $t0,%got($loc+0x10004)($gp)
10 # CHECK: 0: 8f 88 00 01 lw $8, 1($gp)
11 # CHECK: 00000000: R_MIPS_GOT16 .data
12 addi $t0,$t0,%lo($loc+0x10004)
13 # CHECK: 4: 21 08 00 04 addi $8, $8, 4
14 # CHECK: 00000004: R_MIPS_LO16 .data
16 .data
17 $loc:
18 .word 0
19 .space 0x10000
20 .word 0