166 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 22# RUN: llc -run-pass=break-false-deps -verify-machineinstrs %s -o - | FileCheck %s3#4# Check that BreakFalseDeps pass does not crash in presense of dead blocks.5--- |6 ; ModuleID = 'repro.ll'7 target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"8 target triple = "i686-unknown-unknown"9 10 declare fastcc void @hoge() #011 12 ; Function Attrs: nounwind13 define fastcc void @widget(i32 %arg) #1 {14 bb:15 br label %bb116 17 bb1: ; preds = %bb1, %bb18 %phi = phi i1 [ true, %bb ], [ false, %bb1 ]19 br i1 %phi, label %bb1, label %bb220 21 bb2: ; preds = %bb122 br i1 %phi, label %bb4, label %bb323 24 bb3: ; preds = %bb225 ret void26 27 bb4: ; preds = %bb228 br label %bb529 30 bb5: ; preds = %bb5, %bb431 %phi6 = phi double [ 0.000000e+00, %bb4 ], [ %fmul, %bb5 ]32 %fptosi = fptosi double %phi6 to i3233 %icmp = icmp slt i32 %fptosi, %arg34 %select = select i1 %icmp, i32 %fptosi, i32 035 %sitofp = sitofp i32 %select to double36 %fsub = fsub double 0.000000e+00, %sitofp37 %fmul = fmul double 0.000000e+00, %fsub38 br label %bb539 }40 41 declare fastcc void @quux() #042 43 declare fastcc void @hoge.1() #044 45 declare fastcc void @barney() #046 47 declare fastcc void @ham() #048 49 declare fastcc void @wombat() #050 51 attributes #0 = { "target-features"="+sse2" }52 attributes #1 = { nounwind "target-features"="+sse2" }53 54...55---56name: widget57alignment: 1658exposesReturnsTwice: false59legalized: false60regBankSelected: false61selected: false62failedISel: false63tracksRegLiveness: true64hasWinCFI: false65callsEHReturn: false66callsUnwindInit: false67hasEHContTarget: false68hasEHScopes: false69hasEHFunclets: false70isOutlined: false71debugInstrRef: false72failsVerification: false73tracksDebugUserValues: true74registers: []75liveins:76 - { reg: '$ecx', virtual-reg: '' }77frameInfo:78 isFrameAddressTaken: false79 isReturnAddressTaken: false80 hasStackMap: false81 hasPatchPoint: false82 stackSize: 083 offsetAdjustment: 084 maxAlignment: 185 adjustsStack: false86 hasCalls: false87 stackProtector: ''88 functionContext: ''89 maxCallFrameSize: 090 cvBytesOfCalleeSavedRegisters: 091 hasOpaqueSPAdjustment: false92 hasVAStart: false93 hasMustTailInVarArgFunc: false94 hasTailCall: false95 localFrameSize: 096 savePoint: []97 restorePoint: []98fixedStack: []99stack: []100callSites: []101debugValueSubstitutions: []102constants: []103machineFunctionInfo: {}104body: |105 ; CHECK-LABEL: name: widget106 ; CHECK: bb.0.bb:107 ; CHECK-NEXT: successors: %bb.1(0x80000000)108 ; CHECK-NEXT: liveins: $ecx109 ; CHECK-NEXT: {{ $}}110 ; CHECK-NEXT: renamable $al = MOV8ri 1, implicit-def $eax111 ; CHECK-NEXT: {{ $}}112 ; CHECK-NEXT: bb.1.bb1 (align 16):113 ; CHECK-NEXT: successors: %bb.1(0x7c000000), %bb.2(0x04000000)114 ; CHECK-NEXT: liveins: $eax, $ecx115 ; CHECK-NEXT: {{ $}}116 ; CHECK-NEXT: TEST8ri renamable $al, 1, implicit-def $eflags, implicit killed $eax117 ; CHECK-NEXT: renamable $eax = MOV32ri 0118 ; CHECK-NEXT: JCC_1 %bb.1, 5, implicit $eflags119 ; CHECK-NEXT: {{ $}}120 ; CHECK-NEXT: bb.2.bb3:121 ; CHECK-NEXT: RET32122 ; CHECK-NEXT: {{ $}}123 ; CHECK-NEXT: bb.3.bb5:124 ; CHECK-NEXT: successors: %bb.3(0x80000000)125 ; CHECK-NEXT: liveins: $eax, $ecx, $xmm0, $xmm1126 ; CHECK-NEXT: {{ $}}127 ; CHECK-NEXT: renamable $edx = nofpexcept CVTTSD2SIrr killed renamable $xmm1, implicit $mxcsr128 ; CHECK-NEXT: CMP32rr renamable $edx, renamable $ecx, implicit-def $eflags129 ; CHECK-NEXT: renamable $edx = CMOV32rr killed renamable $edx, renamable $eax, 13, implicit killed $eflags130 ; CHECK-NEXT: renamable $xmm2 = CVTSI2SDrr killed renamable $edx131 ; CHECK-NEXT: renamable $xmm1 = XORPSrr undef $xmm1, undef $xmm1132 ; CHECK-NEXT: renamable $xmm1 = nofpexcept SUBSDrr killed renamable $xmm1, killed renamable $xmm2, implicit $mxcsr133 ; CHECK-NEXT: renamable $xmm1 = nofpexcept MULSDrr killed renamable $xmm1, renamable $xmm0, implicit $mxcsr134 ; CHECK-NEXT: JMP_1 %bb.3135 bb.0.bb:136 successors: %bb.1(0x80000000)137 liveins: $ecx138 139 renamable $al = MOV8ri 1, implicit-def $eax140 141 bb.1.bb1 (align 16):142 successors: %bb.1(0x7c000000), %bb.2(0x04000000)143 liveins: $eax, $ecx144 145 TEST8ri renamable $al, 1, implicit-def $eflags, implicit killed $eax146 renamable $eax = MOV32ri 0147 JCC_1 %bb.1, 5, implicit $eflags148 149 bb.2.bb3:150 RET32151 152 bb.3.bb5:153 successors: %bb.3(0x80000000)154 liveins: $eax, $ecx, $xmm0, $xmm1155 156 renamable $edx = nofpexcept CVTTSD2SIrr killed renamable $xmm1, implicit $mxcsr157 CMP32rr renamable $edx, renamable $ecx, implicit-def $eflags158 renamable $edx = CMOV32rr killed renamable $edx, renamable $eax, 13, implicit killed $eflags159 renamable $xmm2 = CVTSI2SDrr killed renamable $edx160 renamable $xmm1 = XORPSrr undef $xmm1, undef $xmm1161 renamable $xmm1 = nofpexcept SUBSDrr killed renamable $xmm1, killed renamable $xmm2, implicit $mxcsr162 renamable $xmm1 = nofpexcept MULSDrr killed renamable $xmm1, renamable $xmm0, implicit $mxcsr163 JMP_1 %bb.3164 165...166