1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ## Check that the delay-slot filler looks at the registers defined by BUNDLE instructions
3 # RUN: llc %s -run-pass=mips-delay-slot-filler -verify-machineinstrs -o - | FileCheck %s
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"
10 ; Function Attrs: nounwind
11 define i64 @test(i1 %cond) local_unnamed_addr #0 {
13 br i1 %cond, label %err, label %return
18 return: ; preds = %entry
22 attributes #0 = { nounwind }
28 exposesReturnsTwice: false
30 regBankSelected: false
33 tracksRegLiveness: true
37 - { reg: '$a0_64', virtual-reg: '' }
39 isFrameAddressTaken: false
40 isReturnAddressTaken: false
50 cvBytesOfCalleeSavedRegisters: 0
51 hasOpaqueSPAdjustment: false
53 hasMustTailInVarArgFunc: false
61 machineFunctionInfo: {}
63 ; CHECK-LABEL: name: test
65 ; CHECK: successors: %bb.2(0x00000001), %bb.1(0x7fffffff)
66 ; CHECK: renamable $at = SLL renamable $a0, 0, implicit killed $a0_64
67 ; CHECK: renamable $at = ANDi killed renamable $at, 1
68 ; CHECK: $v0_64 = DADDiu $zero_64, 1
69 ; CHECK: $v0_64 = DADDiu $v0_64, 1
70 ; CHECK: BUNDLE implicit-def $v0_64 {
71 ; CHECK: $v0_64 = DADDiu $zero_64, 1
72 ; CHECK: $v0_64 = DADDiu $v0_64, 1
74 ; CHECK: BNE killed renamable $at, $zero, %bb.2, implicit-def $at {
75 ; CHECK: $zero = SLL $zero, 0
78 ; CHECK: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
79 ; CHECK: $zero = SLL $zero, 0
83 successors: %bb.1(0x00000001), %bb.2(0x7fffffff)
86 renamable $at = SLL renamable $a0, 0, implicit killed $a0_64
87 renamable $at = ANDi killed renamable $at, 1
88 ; Check that none of these instructions are hoisted after the BUNDLE to avoid
89 ; incorrect values from being
90 $v0_64 = DADDiu $zero_64, 1
91 $v0_64 = DADDiu $v0_64, 1
92 BUNDLE implicit-def $v0_64 {
93 $v0_64 = DADDiu $zero_64, 1
94 $v0_64 = DADDiu $v0_64, 1
96 BNE killed renamable $at, $zero, %bb.1, implicit-def $at
100 PseudoReturn64 undef $ra_64, implicit killed $v0_64