1 ; Test all important variants of the unconditional 'br' instruction.
3 ; RUN: llc -march=mips -mcpu=mips32 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
4 ; RUN: llc -march=mips -mcpu=mips32r2 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
5 ; RUN: llc -march=mips -mcpu=mips32r3 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
6 ; RUN: llc -march=mips -mcpu=mips32r5 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
7 ; RUN: llc -march=mips -mcpu=mips32r6 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,R6C
8 ; RUN: llc -march=mips64 -mcpu=mips4 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
9 ; RUN: llc -march=mips64 -mcpu=mips64 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
10 ; RUN: llc -march=mips64 -mcpu=mips64r2 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
11 ; RUN: llc -march=mips64 -mcpu=mips64r3 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
12 ; RUN: llc -march=mips64 -mcpu=mips64r5 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R6
13 ; RUN: llc -march=mips64 -mcpu=mips64r6 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,R6
15 define i32 @br(ptr %addr) {
17 ; NOT-R6: jr $4 # <MCInst #{{[0-9]+}} JR
18 ; R6C: jrc $4 # <MCInst #{{[0-9]+}} JIC
21 ; ALL: {{\$|\.L}}BB0_1: # %L1
22 ; NOT-R6: jr $ra # <MCInst #{{[0-9]+}} JR
23 ; R6: jr $ra # <MCInst #{{[0-9]+}} JALR
24 ; R6C: jr $ra # <MCInst #{{[0-9]+}} JALR
25 ; ALL: addiu $2, $zero, 0
27 ; ALL: {{\$|\.L}}BB0_2: # %L2
28 ; NOT-R6: jr $ra # <MCInst #{{[0-9]+}} JR
29 ; R6: jr $ra # <MCInst #{{[0-9]+}} JALR
30 ; R6C: jr $ra # <MCInst #{{[0-9]+}} JALR
31 ; ALL: addiu $2, $zero, 1
34 indirectbr ptr %addr, [label %L1, label %L2]