1; Test all important variants of the unconditional 'br' instruction. 2 3; RUN: llc -march=mips -mcpu=mips32 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 4; RUN: llc -march=mips -mcpu=mips32r2 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 5; RUN: llc -march=mips -mcpu=mips32r3 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 6; RUN: llc -march=mips -mcpu=mips32r5 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 7; RUN: llc -march=mips -mcpu=mips32r6 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=R6 8; RUN: llc -march=mips64 -mcpu=mips4 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 9; RUN: llc -march=mips64 -mcpu=mips64 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 10; RUN: llc -march=mips64 -mcpu=mips64r2 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 11; RUN: llc -march=mips64 -mcpu=mips64r3 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 12; RUN: llc -march=mips64 -mcpu=mips64r5 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOT-R6 13; RUN: llc -march=mips64 -mcpu=mips64r6 -asm-show-inst < %s | FileCheck %s -check-prefix=ALL -check-prefix=R6 14 15define i32 @br(i8 *%addr) { 16; ALL-LABEL: br: 17; NOT-R6: jr $4 # <MCInst #{{[0-9]+}} JR 18; R6: jr $4 # <MCInst #{{[0-9]+}} JALR 19 20; ALL: $BB0_1: # %L1 21; NOT-R6: jr $ra # <MCInst #{{[0-9]+}} JR 22; R6: jr $ra # <MCInst #{{[0-9]+}} JALR 23; ALL: addiu $2, $zero, 0 24 25; ALL: $BB0_2: # %L2 26; NOT-R6: jr $ra # <MCInst #{{[0-9]+}} JR 27; R6: jr $ra # <MCInst #{{[0-9]+}} JALR 28; ALL: addiu $2, $zero, 1 29 30entry: 31 indirectbr i8* %addr, [label %L1, label %L2] 32 33L1: 34 ret i32 0 35 36L2: 37 ret i32 1 38} 39