[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / Mips / cpadd.s
blob9b87897e91f2c9d474c947653b0e11c0f17e86e5
1 # RUN: llvm-mc -triple=mips-unknown-linux-gnu -position-independent %s \
2 # RUN: | FileCheck -check-prefix=ASM %s
3 # RUN: llvm-mc -triple=mips64-unknown-linux-gnu -position-independent %s \
4 # RUN: | FileCheck -check-prefix=ASM %s
5 # RUN: llvm-mc -triple=mips-unknown-linux-gnu %s \
6 # RUN: | FileCheck -check-prefix=ASM %s
8 # RUN: llvm-mc -triple=mips-unknown-linux-gnu \
9 # RUN: -position-independent -filetype=obj -o - %s \
10 # RUN: | llvm-objdump -d -r - | FileCheck -check-prefix=OBJ32-PIC %s
11 # RUN: llvm-mc -triple=mips64-unknown-linux-gnu \
12 # RUN: -position-independent -filetype=obj -o - %s \
13 # RUN: | llvm-objdump -d -r - | FileCheck -check-prefix=OBJ64-PIC %s
15 # RUN: llvm-mc -triple=mips-unknown-linux-gnu \
16 # RUN: -filetype=obj -o - %s \
17 # RUN: | llvm-objdump -d -r - | FileCheck -check-prefix=OBJ32-NPIC %s
18 # RUN: llvm-mc -triple=mips64-unknown-linux-gnu \
19 # RUN: -filetype=obj -o - %s \
20 # RUN: | llvm-objdump -d -r - | FileCheck -check-prefix=OBJ64-NPIC %s
22 # ASM: .cpadd $4
23 # OBJ32-PIC: addu $4, $4, $gp
24 # OBJ64-PIC: daddu $4, $4, $gp
25 # OBJ32-NPIC-NOT: addu
26 # OBJ64-NPIC-NOT: daddu
28 .text
29 .cpadd $4