262 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 22# RUN: llc -start-before=machine-latecleanup -stop-after=machine-latecleanup \3# RUN: -o - %s | FileCheck %s4--- |5 ; ModuleID = 'reduced5.ll'6 source_filename = "reduced5.ll"7 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"8 target triple = "aarch64-unknown-linux-gnu"9 10 ; Function Attrs: nounwind11 define void @zot(ptr %arg, ptr %arg1, ptr %arg2, i64 %arg3, i1 %arg4, ptr %arg5) #0 {12 bb:13 %const = bitcast i64 29273397577910035 to i6414 callbr void asm sideeffect "b $0", "!i"()15 to label %bb9 [label %bb8]16 17 bb8: ; preds = %bb18 %const_mat = add i64 %const, 204819 br label %bb920 21 bb9: ; preds = %bb8, %bb22 %phi = phi i64 [ %const_mat, %bb8 ], [ %const, %bb ]23 store volatile i64 %phi, ptr null, align 824 br label %bb1025 26 bb10: ; preds = %bb22, %bb927 %phi11 = phi i64 [ 0, %bb9 ], [ %or24, %bb22 ]28 %phi12 = phi i64 [ 0, %bb9 ], [ %select, %bb22 ]29 %load = load volatile i64, ptr %arg2, align 830 %select = select i1 %arg4, i64 %arg3, i64 031 store i64 %const, ptr %arg5, align 832 %call = call i64 %arg()33 callbr void asm sideeffect "", "!i"()34 to label %bb22 [label %bb22]35 36 bb22: ; preds = %bb10, %bb1037 store i64 0, ptr %arg1, align 838 store volatile i64 1, ptr null, align 839 %or = or i64 %phi11, 040 %or24 = or i64 %phi11, %phi1241 br label %bb1042 }43 44 attributes #0 = { nounwind "frame-pointer"="non-leaf" }45 46...47---48name: zot49alignment: 450exposesReturnsTwice: false51legalized: false52regBankSelected: false53selected: false54failedISel: false55tracksRegLiveness: true56hasWinCFI: false57callsEHReturn: false58callsUnwindInit: false59hasEHContTarget: false60hasEHScopes: false61hasEHFunclets: false62isOutlined: false63debugInstrRef: false64failsVerification: false65tracksDebugUserValues: true66registers: []67liveins:68 - { reg: '$x0', virtual-reg: '' }69 - { reg: '$x1', virtual-reg: '' }70 - { reg: '$x2', virtual-reg: '' }71 - { reg: '$x3', virtual-reg: '' }72 - { reg: '$w4', virtual-reg: '' }73 - { reg: '$x5', virtual-reg: '' }74frameInfo:75 isFrameAddressTaken: false76 isReturnAddressTaken: false77 hasStackMap: false78 hasPatchPoint: false79 stackSize: 9680 offsetAdjustment: 081 maxAlignment: 882 adjustsStack: true83 hasCalls: true84 stackProtector: ''85 functionContext: ''86 maxCallFrameSize: 087 cvBytesOfCalleeSavedRegisters: 088 hasOpaqueSPAdjustment: false89 hasVAStart: false90 hasMustTailInVarArgFunc: false91 hasTailCall: false92 localFrameSize: 093 savePoint: []94 restorePoint: []95fixedStack: []96stack:97 - { id: 0, name: '', type: spill-slot, offset: -8, size: 8, alignment: 8,98 stack-id: default, callee-saved-register: '$x19', callee-saved-restored: true,99 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }100 - { id: 1, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8,101 stack-id: default, callee-saved-register: '$x20', callee-saved-restored: true,102 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }103 - { id: 2, name: '', type: spill-slot, offset: -24, size: 8, alignment: 8,104 stack-id: default, callee-saved-register: '$x21', callee-saved-restored: true,105 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }106 - { id: 3, name: '', type: spill-slot, offset: -32, size: 8, alignment: 8,107 stack-id: default, callee-saved-register: '$x22', callee-saved-restored: true,108 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }109 - { id: 4, name: '', type: spill-slot, offset: -40, size: 8, alignment: 8,110 stack-id: default, callee-saved-register: '$x23', callee-saved-restored: true,111 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }112 - { id: 5, name: '', type: spill-slot, offset: -48, size: 8, alignment: 8,113 stack-id: default, callee-saved-register: '$x24', callee-saved-restored: true,114 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }115 - { id: 6, name: '', type: spill-slot, offset: -56, size: 8, alignment: 8,116 stack-id: default, callee-saved-register: '$x25', callee-saved-restored: true,117 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }118 - { id: 7, name: '', type: spill-slot, offset: -64, size: 8, alignment: 8,119 stack-id: default, callee-saved-register: '$x26', callee-saved-restored: true,120 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }121 - { id: 8, name: '', type: spill-slot, offset: -72, size: 8, alignment: 8,122 stack-id: default, callee-saved-register: '$x27', callee-saved-restored: true,123 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }124 - { id: 9, name: '', type: spill-slot, offset: -80, size: 8, alignment: 8,125 stack-id: default, callee-saved-register: '$x28', callee-saved-restored: true,126 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }127 - { id: 10, name: '', type: spill-slot, offset: -88, size: 8, alignment: 8,128 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true,129 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }130 - { id: 11, name: '', type: spill-slot, offset: -96, size: 8, alignment: 8,131 stack-id: default, callee-saved-register: '$fp', callee-saved-restored: true,132 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }133callSites: []134debugValueSubstitutions: []135constants: []136machineFunctionInfo:137 hasRedZone: false138body: |139 ; CHECK-LABEL: name: zot140 ; CHECK: bb.0.bb:141 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)142 ; CHECK-NEXT: liveins: $w4, $x0, $x1, $x2, $x3, $x5, $lr, $x27, $x28, $x25, $x26, $x23, $x24, $x21, $x22, $x19, $x20143 ; CHECK-NEXT: {{ $}}144 ; CHECK-NEXT: early-clobber $sp = frame-setup STPXpre killed $fp, killed $lr, $sp, -12 :: (store (s64) into %stack.11), (store (s64) into %stack.10)145 ; CHECK-NEXT: frame-setup STPXi killed $x28, killed $x27, $sp, 2 :: (store (s64) into %stack.9), (store (s64) into %stack.8)146 ; CHECK-NEXT: frame-setup STPXi killed $x26, killed $x25, $sp, 4 :: (store (s64) into %stack.7), (store (s64) into %stack.6)147 ; CHECK-NEXT: frame-setup STPXi killed $x24, killed $x23, $sp, 6 :: (store (s64) into %stack.5), (store (s64) into %stack.4)148 ; CHECK-NEXT: frame-setup STPXi killed $x22, killed $x21, $sp, 8 :: (store (s64) into %stack.3), (store (s64) into %stack.2)149 ; CHECK-NEXT: frame-setup STPXi killed $x20, killed $x19, $sp, 10 :: (store (s64) into %stack.1), (store (s64) into %stack.0)150 ; CHECK-NEXT: $fp = frame-setup ADDXri $sp, 0, 0151 ; CHECK-NEXT: renamable $x19 = COPY $x5152 ; CHECK-NEXT: renamable $w20 = COPY $w4153 ; CHECK-NEXT: renamable $x21 = COPY $x3154 ; CHECK-NEXT: renamable $x22 = COPY $x2155 ; CHECK-NEXT: renamable $x23 = COPY $x1156 ; CHECK-NEXT: renamable $x24 = COPY $x0157 ; CHECK-NEXT: INLINEASM_BR &"b $0", 1 /* sideeffect attdialect */, 13 /* imm */, %bb.1158 ; CHECK-NEXT: renamable $x8 = MOVi64imm 29273397577910035159 ; CHECK-NEXT: B %bb.2160 ; CHECK-NEXT: {{ $}}161 ; CHECK-NEXT: bb.1.bb8 (machine-block-address-taken, inlineasm-br-indirect-target):162 ; CHECK-NEXT: successors: %bb.2(0x80000000)163 ; CHECK-NEXT: liveins: $w20, $x19, $x21, $x22, $x23, $x24164 ; CHECK-NEXT: {{ $}}165 ; CHECK-NEXT: renamable $x8 = MOVi64imm 29273397577910035166 ; CHECK-NEXT: renamable $x8 = ADDXri killed renamable $x8, 2048, 0167 ; CHECK-NEXT: {{ $}}168 ; CHECK-NEXT: bb.2.bb9:169 ; CHECK-NEXT: successors: %bb.3(0x80000000)170 ; CHECK-NEXT: liveins: $w20, $x8, $x19, $x21, $x22, $x23, $x24171 ; CHECK-NEXT: {{ $}}172 ; CHECK-NEXT: renamable $x25 = COPY $xzr173 ; CHECK-NEXT: renamable $w27 = MOVi32imm 1, implicit-def $x27174 ; CHECK-NEXT: renamable $x26 = COPY $xzr175 ; CHECK-NEXT: STRXui killed renamable $x8, renamable $x25, 0 :: (volatile store (s64) into `ptr null`)176 ; CHECK-NEXT: {{ $}}177 ; CHECK-NEXT: bb.3.bb10:178 ; CHECK-NEXT: successors: %bb.4(0x80000000)179 ; CHECK-NEXT: liveins: $w20, $x19, $x21, $x22, $x23, $x24, $x25, $x26, $x27180 ; CHECK-NEXT: {{ $}}181 ; CHECK-NEXT: dead $wzr = ANDSWri renamable $w20, 0, implicit-def $nzcv182 ; CHECK-NEXT: dead $xzr = LDRXui renamable $x22, 0 :: (volatile load (s64) from %ir.arg2)183 ; CHECK-NEXT: renamable $x28 = CSELXr renamable $x21, $xzr, 1, implicit killed $nzcv184 ; CHECK-NEXT: renamable $x8 = MOVi64imm 29273397577910035185 ; CHECK-NEXT: STRXui killed renamable $x8, renamable $x19, 0 :: (store (s64) into %ir.arg5)186 ; CHECK-NEXT: BLR renamable $x24, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0187 ; CHECK-NEXT: INLINEASM_BR &"", 1 /* sideeffect attdialect */, 13 /* imm */, %bb.4188 ; CHECK-NEXT: B %bb.4189 ; CHECK-NEXT: {{ $}}190 ; CHECK-NEXT: bb.4.bb22 (machine-block-address-taken, inlineasm-br-indirect-target):191 ; CHECK-NEXT: successors: %bb.3(0x80000000)192 ; CHECK-NEXT: liveins: $w20, $x19, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28193 ; CHECK-NEXT: {{ $}}194 ; CHECK-NEXT: renamable $x8 = COPY $xzr195 ; CHECK-NEXT: renamable $x25 = ORRXrr killed renamable $x25, killed renamable $x26196 ; CHECK-NEXT: renamable $x26 = COPY killed renamable $x28197 ; CHECK-NEXT: STRXui $xzr, renamable $x23, 0 :: (store (s64) into %ir.arg1)198 ; CHECK-NEXT: STRXui renamable $x27, killed renamable $x8, 0 :: (volatile store (s64) into `ptr null`)199 ; CHECK-NEXT: B %bb.3200 bb.0.bb:201 successors: %bb.2(0x80000000), %bb.1(0x00000000)202 liveins: $w4, $x0, $x1, $x2, $x3, $x5, $lr, $x27, $x28, $x25, $x26, $x23, $x24, $x21, $x22, $x19, $x20203 204 early-clobber $sp = frame-setup STPXpre killed $fp, killed $lr, $sp, -12 :: (store (s64) into %stack.11), (store (s64) into %stack.10)205 frame-setup STPXi killed $x28, killed $x27, $sp, 2 :: (store (s64) into %stack.9), (store (s64) into %stack.8)206 frame-setup STPXi killed $x26, killed $x25, $sp, 4 :: (store (s64) into %stack.7), (store (s64) into %stack.6)207 frame-setup STPXi killed $x24, killed $x23, $sp, 6 :: (store (s64) into %stack.5), (store (s64) into %stack.4)208 frame-setup STPXi killed $x22, killed $x21, $sp, 8 :: (store (s64) into %stack.3), (store (s64) into %stack.2)209 frame-setup STPXi killed $x20, killed $x19, $sp, 10 :: (store (s64) into %stack.1), (store (s64) into %stack.0)210 $fp = frame-setup ADDXri $sp, 0, 0211 renamable $x19 = COPY $x5212 renamable $w20 = COPY $w4213 renamable $x21 = COPY $x3214 renamable $x22 = COPY $x2215 renamable $x23 = COPY $x1216 renamable $x24 = COPY $x0217 INLINEASM_BR &"b $0", 1 /* sideeffect attdialect */, 13 /* imm */, %bb.1218 renamable $x8 = MOVi64imm 29273397577910035219 B %bb.2220 221 bb.1.bb8 (machine-block-address-taken, inlineasm-br-indirect-target):222 successors: %bb.2(0x80000000)223 liveins: $w20, $x19, $x21, $x22, $x23, $x24224 225 renamable $x8 = MOVi64imm 29273397577910035226 renamable $x8 = ADDXri killed renamable $x8, 2048, 0227 228 bb.2.bb9:229 successors: %bb.3(0x80000000)230 liveins: $w20, $x8, $x19, $x21, $x22, $x23, $x24231 232 renamable $x25 = COPY $xzr233 renamable $w27 = MOVi32imm 1, implicit-def $x27234 renamable $x26 = COPY $xzr235 STRXui killed renamable $x8, renamable $x25, 0 :: (volatile store (s64) into `ptr null`)236 237 bb.3.bb10:238 successors: %bb.4(0x80000000)239 liveins: $w20, $x19, $x21, $x22, $x23, $x24, $x25, $x26, $x27240 241 dead $wzr = ANDSWri renamable $w20, 0, implicit-def $nzcv242 dead $xzr = LDRXui renamable $x22, 0 :: (volatile load (s64) from %ir.arg2)243 renamable $x28 = CSELXr renamable $x21, $xzr, 1, implicit killed $nzcv244 renamable $x8 = MOVi64imm 29273397577910035245 STRXui killed renamable $x8, renamable $x19, 0 :: (store (s64) into %ir.arg5)246 BLR renamable $x24, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0247 INLINEASM_BR &"", 1 /* sideeffect attdialect */, 13 /* imm */, %bb.4248 B %bb.4249 250 bb.4.bb22 (machine-block-address-taken, inlineasm-br-indirect-target):251 successors: %bb.3(0x80000000)252 liveins: $w20, $x19, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28253 254 renamable $x8 = COPY $xzr255 renamable $x25 = ORRXrr killed renamable $x25, killed renamable $x26256 renamable $x26 = COPY killed renamable $x28257 STRXui $xzr, renamable $x23, 0 :: (store (s64) into %ir.arg1)258 STRXui renamable $x27, killed renamable $x8, 0 :: (volatile store (s64) into `ptr null`)259 B %bb.3260 261...262