brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.3 KiB · ea71685 Raw
243 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=mips-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-branch-expansion | FileCheck %s --check-prefix=MIPS3# RUN: llc -mtriple=mips-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-branch-expansion -relocation-model=pic | FileCheck %s --check-prefix=PIC4# Test the long branch expansion of various branches5 6--- |7 8  define i32 @a(double %a, double %b) {9  entry:10    %cmp = fcmp une double %a, %b11    br i1 %cmp, label %if.then, label %return12 13  if.then:14    call void asm sideeffect ".space 310680", "~{$1}"()15    ret i32 016 17  return:18    ret i32 119  }20 21  define i32 @b(double %a, double %b) {22  entry:23    %cmp = fcmp une double %a, %b24    br i1 %cmp, label %if.then, label %return25 26  if.then:27    call void asm sideeffect ".space 310680", "~{$1}"()28    ret i32 029 30  return:31    ret i32 132  }33 34...35---36name:            a37alignment:       438exposesReturnsTwice: false39legalized:       false40regBankSelected: false41selected:        false42failedISel:      false43tracksRegLiveness: true44registers:45liveins:46  - { reg: '$d6', virtual-reg: '' }47  - { reg: '$d7', virtual-reg: '' }48frameInfo:49  isFrameAddressTaken: false50  isReturnAddressTaken: false51  hasStackMap:     false52  hasPatchPoint:   false53  stackSize:       054  offsetAdjustment: 055  maxAlignment:    156  adjustsStack:    false57  hasCalls:        false58  stackProtector:  ''59  maxCallFrameSize: 060  hasOpaqueSPAdjustment: false61  hasVAStart:      false62  hasMustTailInVarArgFunc: false63  localFrameSize:  064  savePoint:       []65  restorePoint:    []66fixedStack:67stack:68constants:69body:             |70  ; MIPS-LABEL: name: a71  ; MIPS: bb.0.entry:72  ; MIPS:   successors: %bb.2(0x50000000), %bb.1(0x30000000)73  ; MIPS:   FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc074  ; MIPS:   BC1F $fcc0, %bb.2, implicit-def $at {75  ; MIPS:     $zero = SLL $zero, 076  ; MIPS:   }77  ; MIPS: bb.1.entry:78  ; MIPS:   successors: %bb.3(0x80000000)79  ; MIPS:   J %bb.3, implicit-def $at {80  ; MIPS:     $zero = SLL $zero, 081  ; MIPS:   }82  ; MIPS: bb.2.if.then:83  ; MIPS:   INLINEASM &".space 310680", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $at84  ; MIPS:   PseudoReturn undef $ra, implicit killed $v0 {85  ; MIPS:     $v0 = ADDiu $zero, 086  ; MIPS:   }87  ; MIPS: bb.3.return:88  ; MIPS:   PseudoReturn undef $ra, implicit killed $v0 {89  ; MIPS:     $v0 = ADDiu $zero, 190  ; MIPS:   }91  ; PIC-LABEL: name: a92  ; PIC: bb.0.entry:93  ; PIC:   successors: %bb.3(0x50000000), %bb.1(0x30000000)94  ; PIC:   FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc095  ; PIC:   BC1F $fcc0, %bb.3, implicit-def $at {96  ; PIC:     $zero = SLL $zero, 097  ; PIC:   }98  ; PIC: bb.1.entry:99  ; PIC:   successors: %bb.2(0x80000000)100  ; PIC:   $sp = ADDiu $sp, -8101  ; PIC:   SW $ra, $sp, 0102  ; PIC:   $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2103  ; PIC:   BAL_BR %bb.2, implicit-def $ra {104  ; PIC:     $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2105  ; PIC:   }106  ; PIC: bb.2.entry:107  ; PIC:   successors: %bb.4(0x80000000)108  ; PIC:   $at = ADDu $ra, $at109  ; PIC:   $ra = LW $sp, 0110  ; PIC:   JR $at {111  ; PIC:     $sp = ADDiu $sp, 8112  ; PIC:   }113  ; PIC: bb.3.if.then:114  ; PIC:   INLINEASM &".space 310680", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $at115  ; PIC:   PseudoReturn undef $ra, implicit killed $v0 {116  ; PIC:     $v0 = ADDiu $zero, 0117  ; PIC:   }118  ; PIC: bb.4.return:119  ; PIC:   PseudoReturn undef $ra, implicit killed $v0 {120  ; PIC:     $v0 = ADDiu $zero, 1121  ; PIC:   }122  bb.0.entry:123    successors: %bb.1(0x50000000), %bb.2(0x30000000)124    liveins: $d6, $d7125 126    FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0127    BC1T killed $fcc0, %bb.2, implicit-def $at128 129  bb.1.if.then:130    INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at131    $v0 = ADDiu $zero, 0132    PseudoReturn undef $ra, implicit killed $v0133 134  bb.2.return:135    $v0 = ADDiu $zero, 1136    PseudoReturn undef $ra, implicit killed $v0137 138...139---140name:            b141alignment:       4142exposesReturnsTwice: false143legalized:       false144regBankSelected: false145selected:        false146failedISel:      false147tracksRegLiveness: true148registers:149liveins:150  - { reg: '$d6', virtual-reg: '' }151  - { reg: '$d7', virtual-reg: '' }152frameInfo:153  isFrameAddressTaken: false154  isReturnAddressTaken: false155  hasStackMap:     false156  hasPatchPoint:   false157  stackSize:       0158  offsetAdjustment: 0159  maxAlignment:    1160  adjustsStack:    false161  hasCalls:        false162  stackProtector:  ''163  maxCallFrameSize: 0164  hasOpaqueSPAdjustment: false165  hasVAStart:      false166  hasMustTailInVarArgFunc: false167  localFrameSize:  0168  savePoint:       []169  restorePoint:    []170fixedStack:171stack:172constants:173body:             |174  ; MIPS-LABEL: name: b175  ; MIPS: bb.0.entry:176  ; MIPS:   successors: %bb.2(0x50000000), %bb.1(0x30000000)177  ; MIPS:   FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0178  ; MIPS:   BC1T $fcc0, %bb.2, implicit-def $at {179  ; MIPS:     $zero = SLL $zero, 0180  ; MIPS:   }181  ; MIPS: bb.1.entry:182  ; MIPS:   successors: %bb.3(0x80000000)183  ; MIPS:   J %bb.3, implicit-def $at {184  ; MIPS:     $zero = SLL $zero, 0185  ; MIPS:   }186  ; MIPS: bb.2.if.then:187  ; MIPS:   INLINEASM &".space 310680", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $at188  ; MIPS:   PseudoReturn undef $ra, implicit killed $v0 {189  ; MIPS:     $v0 = ADDiu $zero, 0190  ; MIPS:   }191  ; MIPS: bb.3.return:192  ; MIPS:   PseudoReturn undef $ra, implicit killed $v0 {193  ; MIPS:     $v0 = ADDiu $zero, 1194  ; MIPS:   }195  ; PIC-LABEL: name: b196  ; PIC: bb.0.entry:197  ; PIC:   successors: %bb.3(0x50000000), %bb.1(0x30000000)198  ; PIC:   FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0199  ; PIC:   BC1T $fcc0, %bb.3, implicit-def $at {200  ; PIC:     $zero = SLL $zero, 0201  ; PIC:   }202  ; PIC: bb.1.entry:203  ; PIC:   successors: %bb.2(0x80000000)204  ; PIC:   $sp = ADDiu $sp, -8205  ; PIC:   SW $ra, $sp, 0206  ; PIC:   $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2207  ; PIC:   BAL_BR %bb.2, implicit-def $ra {208  ; PIC:     $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2209  ; PIC:   }210  ; PIC: bb.2.entry:211  ; PIC:   successors: %bb.4(0x80000000)212  ; PIC:   $at = ADDu $ra, $at213  ; PIC:   $ra = LW $sp, 0214  ; PIC:   JR $at {215  ; PIC:     $sp = ADDiu $sp, 8216  ; PIC:   }217  ; PIC: bb.3.if.then:218  ; PIC:   INLINEASM &".space 310680", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $at219  ; PIC:   PseudoReturn undef $ra, implicit killed $v0 {220  ; PIC:     $v0 = ADDiu $zero, 0221  ; PIC:   }222  ; PIC: bb.4.return:223  ; PIC:   PseudoReturn undef $ra, implicit killed $v0 {224  ; PIC:     $v0 = ADDiu $zero, 1225  ; PIC:   }226  bb.0.entry:227    successors: %bb.1(0x50000000), %bb.2(0x30000000)228    liveins: $d6, $d7229 230    FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0231    BC1F killed $fcc0, %bb.2, implicit-def $at232 233  bb.1.if.then:234    INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at235    $v0 = ADDiu $zero, 0236    PseudoReturn undef $ra, implicit killed $v0237 238  bb.2.return:239    $v0 = ADDiu $zero, 1240    PseudoReturn undef $ra, implicit killed $v0241 242...243