105 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2## Check that the delay-slot filler looks at the registers defined by BUNDLE instructions3# RUN: llc %s -run-pass=mips-delay-slot-filler -verify-machineinstrs -o - | FileCheck %s4--- |5 ; ModuleID = '/Users/alex/cheri/llvm-project/llvm/test/CodeGen/Mips/delay-test.ll'6 source_filename = "/Users/alex/cheri/llvm-project/llvm/test/CodeGen/Mips/delay-test.ll"7 target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"8 target triple = "mips64-unknown-freebsd"9 10 ; Function Attrs: nounwind11 define i64 @test(i1 %cond) local_unnamed_addr #0 {12 entry:13 br i1 %cond, label %err, label %return14 15 err: ; preds = %entry16 unreachable17 18 return: ; preds = %entry19 ret i64 120 }21 22 attributes #0 = { nounwind }23 24...25---26name: test27alignment: 828exposesReturnsTwice: false29legalized: false30regBankSelected: false31selected: false32failedISel: false33tracksRegLiveness: true34hasWinCFI: false35registers: []36liveins:37 - { reg: '$a0_64', virtual-reg: '' }38frameInfo:39 isFrameAddressTaken: false40 isReturnAddressTaken: false41 hasStackMap: false42 hasPatchPoint: false43 stackSize: 044 offsetAdjustment: 045 maxAlignment: 146 adjustsStack: false47 hasCalls: false48 stackProtector: ''49 maxCallFrameSize: 050 cvBytesOfCalleeSavedRegisters: 051 hasOpaqueSPAdjustment: false52 hasVAStart: false53 hasMustTailInVarArgFunc: false54 localFrameSize: 055 savePoint: []56 restorePoint: []57fixedStack: []58stack: []59callSites: []60constants: []61machineFunctionInfo: {}62body: |63 ; CHECK-LABEL: name: test64 ; CHECK: bb.0.entry:65 ; CHECK: successors: %bb.2(0x00000001), %bb.1(0x7fffffff)66 ; CHECK: renamable $at = SLL renamable $a0, 0, implicit killed $a0_6467 ; CHECK: renamable $at = ANDi killed renamable $at, 168 ; CHECK: $v0_64 = DADDiu $zero_64, 169 ; CHECK: $v0_64 = DADDiu $v0_64, 170 ; CHECK: BUNDLE implicit-def $v0_64 {71 ; CHECK: $v0_64 = DADDiu $zero_64, 172 ; CHECK: $v0_64 = DADDiu $v0_64, 173 ; CHECK: }74 ; CHECK: BNE killed renamable $at, $zero, %bb.2, implicit-def $at {75 ; CHECK: $zero = SLL $zero, 076 ; CHECK: }77 ; CHECK: bb.1.return:78 ; CHECK: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {79 ; CHECK: $zero = SLL $zero, 080 ; CHECK: }81 ; CHECK: bb.2.err:82 bb.0.entry:83 successors: %bb.1(0x00000001), %bb.2(0x7fffffff)84 liveins: $a0_6485 86 renamable $at = SLL renamable $a0, 0, implicit killed $a0_6487 renamable $at = ANDi killed renamable $at, 188 ; Check that none of these instructions are hoisted after the BUNDLE to avoid89 ; incorrect values from being90 $v0_64 = DADDiu $zero_64, 191 $v0_64 = DADDiu $v0_64, 192 BUNDLE implicit-def $v0_64 {93 $v0_64 = DADDiu $zero_64, 194 $v0_64 = DADDiu $v0_64, 195 }96 BNE killed renamable $at, $zero, %bb.1, implicit-def $at97 98 bb.2.return:99 liveins: $v0_64100 PseudoReturn64 undef $ra_64, implicit killed $v0_64101 102 bb.1.err:103 104...105