42 lines · plain
1; Test all important variants of the unconditional 'br' instruction.2 3; RUN: llc -mtriple=mips-elf -mcpu=mips32 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R64; RUN: llc -mtriple=mips-elf -mcpu=mips32r2 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R65; RUN: llc -mtriple=mips-elf -mcpu=mips32r3 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R66; RUN: llc -mtriple=mips-elf -mcpu=mips32r5 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R67; RUN: llc -mtriple=mips-elf -mcpu=mips32r6 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,R6C8; RUN: llc -mtriple=mips64-elf -mcpu=mips4 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R69; RUN: llc -mtriple=mips64-elf -mcpu=mips64 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R610; RUN: llc -mtriple=mips64-elf -mcpu=mips64r2 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R611; RUN: llc -mtriple=mips64-elf -mcpu=mips64r3 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R612; RUN: llc -mtriple=mips64-elf -mcpu=mips64r5 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,NOT-R613; RUN: llc -mtriple=mips64-elf -mcpu=mips64r6 -asm-show-inst < %s | FileCheck %s -check-prefixes=ALL,R614 15define i32 @br(ptr %addr) {16; ALL-LABEL: br:17; NOT-R6: jr $4 # <MCInst #{{[0-9]+}} JR18; R6C: jrc $4 # <MCInst #{{[0-9]+}} JIC19 20 21; ALL: {{\$|\.L}}BB0_1: # %L122; NOT-R6: jr $ra # <MCInst #{{[0-9]+}} JR23; R6: jr $ra # <MCInst #{{[0-9]+}} JALR24; R6C: jr $ra # <MCInst #{{[0-9]+}} JALR25; ALL: addiu $2, $zero, 026 27; ALL: {{\$|\.L}}BB0_2: # %L228; NOT-R6: jr $ra # <MCInst #{{[0-9]+}} JR29; R6: jr $ra # <MCInst #{{[0-9]+}} JALR30; R6C: jr $ra # <MCInst #{{[0-9]+}} JALR31; ALL: addiu $2, $zero, 132 33entry:34 indirectbr ptr %addr, [label %L1, label %L2]35 36L1:37 ret i32 038 39L2:40 ret i32 141}42