xref: /llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/vpt-block-debug.mir (revision 59c6bd156cc8b42758ce90909615748e21c6eee2)
1# RUN: llc -mtriple=thumbv8.1m.main -mattr=+mve -run-pass=arm-low-overhead-loops %s -o - | FileCheck %s
2
3--- |
4  target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
5  target triple = "thumbv8.1m.main-arm-none-eabi"
6
7  %struct.arm_2d_size_t = type { i16, i16 }
8
9  define void @__arm_2d_impl_rgb16_cl_key_1x1_paving_x_mirror_xx(ptr noalias %pSource, i16 signext %iSourceStride, ptr noalias %pTarget, i16 signext %iTargetStride, ptr noalias nocapture readonly %ptSrcCopySize, ptr noalias nocapture readonly %ptDstCopySize, i16 zeroext %Colour) local_unnamed_addr #0 !dbg !12 {
10  entry:
11    call void @llvm.dbg.value(metadata ptr %pSource, metadata !33, metadata !DIExpression()), !dbg !62
12    call void @llvm.dbg.value(metadata i16 %iSourceStride, metadata !34, metadata !DIExpression()), !dbg !62
13    call void @llvm.dbg.value(metadata ptr %pTarget, metadata !35, metadata !DIExpression()), !dbg !62
14    call void @llvm.dbg.value(metadata i16 %iTargetStride, metadata !36, metadata !DIExpression()), !dbg !62
15    call void @llvm.dbg.value(metadata ptr %ptSrcCopySize, metadata !37, metadata !DIExpression()), !dbg !62
16    call void @llvm.dbg.value(metadata ptr %ptDstCopySize, metadata !38, metadata !DIExpression()), !dbg !62
17    call void @llvm.dbg.value(metadata i16 %Colour, metadata !39, metadata !DIExpression()), !dbg !62
18    call void @llvm.dbg.value(metadata i16 undef, metadata !40, metadata !DIExpression(DW_OP_LLVM_convert, 16, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value)), !dbg !62
19    call void @llvm.dbg.value(metadata i32 0, metadata !43, metadata !DIExpression()), !dbg !63
20    %iHeight = getelementptr inbounds %struct.arm_2d_size_t, ptr %ptDstCopySize, i32 0, i32 1
21    %0 = load i16, ptr %iHeight, align 2, !tbaa !64
22    %conv1 = sext i16 %0 to i32
23    %conv8 = sext i16 %iSourceStride to i32
24    %conv10 = sext i16 %iTargetStride to i32
25    call void @llvm.dbg.value(metadata ptr %pSource, metadata !33, metadata !DIExpression()), !dbg !62
26    call void @llvm.dbg.value(metadata ptr %pTarget, metadata !35, metadata !DIExpression()), !dbg !62
27    call void @llvm.dbg.value(metadata i32 0, metadata !43, metadata !DIExpression()), !dbg !63
28    %cmp34 = icmp sgt i16 %0, 0, !dbg !69
29    br i1 %cmp34, label %for.body.lr.ph, label %for.cond.cleanup, !dbg !70
30
31  for.body.lr.ph:                                   ; preds = %entry
32    %iWidth2 = bitcast ptr %ptSrcCopySize to ptr, !dbg !71
33    %1 = load i16, ptr %iWidth2, align 2, !dbg !71, !tbaa !72
34    call void @llvm.dbg.value(metadata i16 %1, metadata !40, metadata !DIExpression(DW_OP_LLVM_convert, 16, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value)), !dbg !62
35    %conv = sext i16 %1 to i32, !dbg !73
36    call void @llvm.dbg.value(metadata i32 %conv, metadata !40, metadata !DIExpression()), !dbg !62
37    %sub = add nsw i32 %conv, -1
38    %iWidth33 = bitcast ptr %ptDstCopySize to ptr
39    %2 = load i16, ptr %iWidth33, align 2, !tbaa !72
40    %conv4 = sext i16 %2 to i32
41    %3 = tail call { <8 x i16>, i32 } @llvm.arm.mve.vddup.v8i16(i32 %sub, i32 1), !dbg !62
42    %4 = add i32 %conv4, 7, !dbg !70
43    %smin = call i32 @llvm.smin.i32(i32 %conv4, i32 8), !dbg !70
44    %5 = sub i32 %4, %smin, !dbg !70
45    %6 = lshr i32 %5, 3, !dbg !70
46    %7 = add nuw nsw i32 %6, 1, !dbg !70
47    br label %for.body, !dbg !70
48
49  for.cond.cleanup:                                 ; preds = %do.end, %entry
50    ret void, !dbg !74
51
52  for.body:                                         ; preds = %do.end, %for.body.lr.ph
53    %pSource.addr.037 = phi ptr [ %pSource, %for.body.lr.ph ], [ %add.ptr9, %do.end ]
54    %pTarget.addr.036 = phi ptr [ %pTarget, %for.body.lr.ph ], [ %add.ptr11, %do.end ]
55    %y.035 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %do.end ]
56    call void @llvm.dbg.value(metadata ptr %pSource.addr.037, metadata !33, metadata !DIExpression()), !dbg !62
57    call void @llvm.dbg.value(metadata ptr %pTarget.addr.036, metadata !35, metadata !DIExpression()), !dbg !62
58    call void @llvm.dbg.value(metadata i32 %y.035, metadata !43, metadata !DIExpression()), !dbg !63
59    call void @llvm.dbg.value(metadata ptr %pTarget.addr.036, metadata !46, metadata !DIExpression()), !dbg !75
60    call void @llvm.dbg.value(metadata ptr %pSource.addr.037, metadata !49, metadata !DIExpression()), !dbg !75
61    call void @llvm.dbg.value(metadata i32 %conv4, metadata !50, metadata !DIExpression()), !dbg !75
62    call void @llvm.dbg.value(metadata i32 undef, metadata !51, metadata !DIExpression()), !dbg !75
63    call void @llvm.dbg.value(metadata <8 x i16> undef, metadata !52, metadata !DIExpression()), !dbg !75
64    %8 = call i32 @llvm.start.loop.iterations.i32(i32 %7), !dbg !76
65    br label %do.body, !dbg !76
66
67  do.body:                                          ; preds = %do.body, %for.body
68    %pDst.0 = phi ptr [ %pTarget.addr.036, %for.body ], [ %add.ptr, %do.body ], !dbg !75
69    %dstWidth.0 = phi i32 [ %conv4, %for.body ], [ %sub5, %do.body ], !dbg !75
70    %.pn = phi { <8 x i16>, i32 } [ %3, %for.body ], [ %12, %do.body ]
71    %9 = phi i32 [ %8, %for.body ], [ %17, %do.body ], !dbg !75
72    %pDst.01 = bitcast ptr %pDst.0 to ptr, !dbg !75
73    %offset.0 = extractvalue { <8 x i16>, i32 } %.pn, 0, !dbg !75
74    %curOffsetIdx.0 = extractvalue { <8 x i16>, i32 } %.pn, 1, !dbg !75
75    call void @llvm.dbg.value(metadata <8 x i16> %offset.0, metadata !52, metadata !DIExpression()), !dbg !75
76    call void @llvm.dbg.value(metadata i32 %curOffsetIdx.0, metadata !51, metadata !DIExpression()), !dbg !75
77    call void @llvm.dbg.value(metadata i32 %dstWidth.0, metadata !50, metadata !DIExpression()), !dbg !75
78    call void @llvm.dbg.value(metadata ptr %pDst.0, metadata !46, metadata !DIExpression()), !dbg !75
79    %10 = tail call <8 x i1> @llvm.arm.mve.vctp16(i32 %dstWidth.0), !dbg !77
80    call void @llvm.dbg.value(metadata i32 undef, metadata !58, metadata !DIExpression()), !dbg !78
81    %11 = tail call <8 x i16> @llvm.arm.mve.vldr.gather.offset.predicated.v8i16.p0.v8i16.v8i1(ptr %pSource.addr.037, <8 x i16> %offset.0, i32 16, i32 1, i32 1, <8 x i1> %10), !dbg !79
82    call void @llvm.dbg.value(metadata <8 x i16> %11, metadata !61, metadata !DIExpression()), !dbg !78
83    %12 = tail call { <8 x i16>, i32 } @llvm.arm.mve.vddup.predicated.v8i16.v8i1(<8 x i16> undef, i32 %curOffsetIdx.0, i32 1, <8 x i1> %10), !dbg !80
84    call void @llvm.dbg.value(metadata i32 undef, metadata !51, metadata !DIExpression()), !dbg !75
85    call void @llvm.dbg.value(metadata <8 x i16> undef, metadata !52, metadata !DIExpression()), !dbg !75
86    %13 = insertelement <8 x i16> poison, i16 %Colour, i32 0
87    %14 = shufflevector <8 x i16> %13, <8 x i16> poison, <8 x i32> zeroinitializer
88    %15 = icmp ne <8 x i16> %11, %14, !dbg !81
89    %16 = and <8 x i1> %15, %10, !dbg !81
90    call void @llvm.dbg.value(metadata i32 undef, metadata !58, metadata !DIExpression(DW_OP_LLVM_convert, 32, DW_ATE_unsigned, DW_OP_LLVM_convert, 16, DW_ATE_unsigned, DW_OP_stack_value)), !dbg !78
91    tail call void @llvm.masked.store.v8i16.p0(<8 x i16> %11, ptr %pDst.01, i32 2, <8 x i1> %16), !dbg !82
92    %add.ptr = getelementptr inbounds i16, ptr %pDst.0, i32 8, !dbg !83
93    call void @llvm.dbg.value(metadata ptr %add.ptr, metadata !46, metadata !DIExpression()), !dbg !75
94    %sub5 = add nsw i32 %dstWidth.0, -8, !dbg !84
95    call void @llvm.dbg.value(metadata i32 %sub5, metadata !50, metadata !DIExpression()), !dbg !75
96    %17 = call i32 @llvm.loop.decrement.reg.i32(i32 %9, i32 1), !dbg !85
97    %18 = icmp ne i32 %17, 0, !dbg !85
98    br i1 %18, label %do.body, label %do.end, !dbg !85, !llvm.loop !86
99
100  do.end:                                           ; preds = %do.body
101    %add.ptr9 = getelementptr inbounds i16, ptr %pSource.addr.037, i32 %conv8, !dbg !89
102    call void @llvm.dbg.value(metadata ptr %add.ptr9, metadata !33, metadata !DIExpression()), !dbg !62
103    %add.ptr11 = getelementptr inbounds i16, ptr %pTarget.addr.036, i32 %conv10, !dbg !90
104    call void @llvm.dbg.value(metadata ptr %add.ptr11, metadata !35, metadata !DIExpression()), !dbg !62
105    %inc = add nuw nsw i32 %y.035, 1, !dbg !91
106    call void @llvm.dbg.value(metadata i32 %inc, metadata !43, metadata !DIExpression()), !dbg !63
107    %exitcond.not = icmp eq i32 %inc, %conv1, !dbg !69
108    br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !dbg !70, !llvm.loop !92
109  }
110
111  declare { <8 x i16>, i32 } @llvm.arm.mve.vddup.v8i16(i32, i32)
112  declare <8 x i1> @llvm.arm.mve.vctp16(i32)
113  declare <8 x i16> @llvm.arm.mve.vldr.gather.offset.predicated.v8i16.p0.v8i16.v8i1(ptr, <8 x i16>, i32, i32, i32, <8 x i1>)
114  declare { <8 x i16>, i32 } @llvm.arm.mve.vddup.predicated.v8i16.v8i1(<8 x i16>, i32, i32, <8 x i1>)
115  declare void @llvm.masked.store.v8i16.p0(<8 x i16>, ptr, i32 immarg, <8 x i1>)
116  declare void @llvm.dbg.value(metadata, metadata, metadata)
117  declare i32 @llvm.smin.i32(i32, i32)
118  declare i32 @llvm.start.loop.iterations.i32(i32)
119  declare i32 @llvm.loop.decrement.reg.i32(i32, i32)
120
121  attributes #0 = { nofree nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="cortex-m55" "target-features"="+armv8.1-m.main,+cdecp0,+dsp,+fp-armv8d16,+fp-armv8d16sp,+fp16,+fp64,+fullfp16,+hwdiv,+lob,+mve,+mve.fp,+ras,+strict-align,+thumb-mode,+vfp2,+vfp2sp,+vfp3d16,+vfp3d16sp,+vfp4d16,+vfp4d16sp,-aes,-bf16,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-fp-armv8,-fp-armv8sp,-fp16fml,-hwdiv-arm,-i8mm,-neon,-sb,-sha2,-vfp3,-vfp3sp,-vfp4,-vfp4sp" "unsafe-fp-math"="true" }
122
123  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, splitDebugInlining: false, nameTableKind: None)
124  !1 = !DIFile(filename: "tmp.c", directory: "")
125  !2 = !{!3}
126  !3 = !DIDerivedType(tag: DW_TAG_typedef, name: "int32_t", file: !4, line: 58, baseType: !5)
127  !4 = !DIFile(filename: "stdint.h", directory: "")
128  !5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
129  !6 = !{i32 7, !"Dwarf Version", i32 4}
130  !7 = !{i32 2, !"Debug Info Version", i32 3}
131  !8 = !{i32 1, !"wchar_size", i32 4}
132  !9 = !{i32 1, !"min_enum_size", i32 4}
133  !10 = !{i32 7, !"frame-pointer", i32 2}
134  !11 = !{!"clang"}
135  !12 = distinct !DISubprogram(name: "__arm_2d_impl_rgb16_cl_key_1x1_paving_x_mirror_xx", scope: !1, file: !1, line: 61, type: !13, scopeLine: 71, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !32)
136  !13 = !DISubroutineType(types: !14)
137  !14 = !{null, !15, !20, !22, !20, !24, !24, !18}
138  !15 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !16)
139  !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !17, size: 32)
140  !17 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !18)
141  !18 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint16_t", file: !4, line: 63, baseType: !19)
142  !19 = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned)
143  !20 = !DIDerivedType(tag: DW_TAG_typedef, name: "int16_t", file: !4, line: 57, baseType: !21)
144  !21 = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)
145  !22 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !23)
146  !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 32)
147  !24 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !25)
148  !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !26, size: 32)
149  !26 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !27)
150  !27 = !DIDerivedType(tag: DW_TAG_typedef, name: "arm_2d_size_t", file: !1, line: 8, baseType: !28)
151  !28 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "arm_2d_size_t", file: !1, line: 5, size: 32, elements: !29)
152  !29 = !{!30, !31}
153  !30 = !DIDerivedType(tag: DW_TAG_member, name: "iWidth", scope: !28, file: !1, line: 6, baseType: !20, size: 16)
154  !31 = !DIDerivedType(tag: DW_TAG_member, name: "iHeight", scope: !28, file: !1, line: 7, baseType: !20, size: 16, offset: 16)
155  !32 = !{!33, !34, !35, !36, !37, !38, !39, !40, !43, !46, !49, !50, !51, !52, !58, !61}
156  !33 = !DILocalVariable(name: "pSource", arg: 1, scope: !12, file: !1, line: 62, type: !15)
157  !34 = !DILocalVariable(name: "iSourceStride", arg: 2, scope: !12, file: !1, line: 63, type: !20)
158  !35 = !DILocalVariable(name: "pTarget", arg: 3, scope: !12, file: !1, line: 64, type: !22)
159  !36 = !DILocalVariable(name: "iTargetStride", arg: 4, scope: !12, file: !1, line: 65, type: !20)
160  !37 = !DILocalVariable(name: "ptSrcCopySize", arg: 5, scope: !12, file: !1, line: 67, type: !24)
161  !38 = !DILocalVariable(name: "ptDstCopySize", arg: 6, scope: !12, file: !1, line: 69, type: !24)
162  !39 = !DILocalVariable(name: "Colour", arg: 7, scope: !12, file: !1, line: 70, type: !18)
163  !40 = !DILocalVariable(name: "srcWidth", scope: !12, file: !1, line: 72, type: !41)
164  !41 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32_t", file: !4, line: 64, baseType: !42)
165  !42 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
166  !43 = !DILocalVariable(name: "y", scope: !44, file: !1, line: 74, type: !45)
167  !44 = distinct !DILexicalBlock(scope: !12, file: !1, line: 74, column: 5)
168  !45 = !DIDerivedType(tag: DW_TAG_typedef, name: "int_fast16_t", file: !4, line: 86, baseType: !5)
169  !46 = !DILocalVariable(name: "pDst", scope: !47, file: !1, line: 75, type: !23)
170  !47 = distinct !DILexicalBlock(scope: !48, file: !1, line: 74, column: 63)
171  !48 = distinct !DILexicalBlock(scope: !44, file: !1, line: 74, column: 5)
172  !49 = !DILocalVariable(name: "pSrc", scope: !47, file: !1, line: 76, type: !15)
173  !50 = !DILocalVariable(name: "dstWidth", scope: !47, file: !1, line: 77, type: !41)
174  !51 = !DILocalVariable(name: "curOffsetIdx", scope: !47, file: !1, line: 78, type: !41)
175  !52 = !DILocalVariable(name: "offset", scope: !47, file: !1, line: 79, type: !53)
176  !53 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint16x8_t", file: !54, line: 37, baseType: !55)
177  !54 = !DIFile(filename: "lib/clang/14.0.0/include/arm_mve.h", directory: "")
178  !55 = !DICompositeType(tag: DW_TAG_array_type, baseType: !18, size: 128, flags: DIFlagVector, elements: !56)
179  !56 = !{!57}
180  !57 = !DISubrange(count: 8)
181  !58 = !DILocalVariable(name: "p", scope: !59, file: !1, line: 81, type: !60)
182  !59 = distinct !DILexicalBlock(scope: !47, file: !1, line: 80, column: 12)
183  !60 = !DIDerivedType(tag: DW_TAG_typedef, name: "mve_pred16_t", file: !54, line: 24, baseType: !18)
184  !61 = !DILocalVariable(name: "in", scope: !59, file: !1, line: 82, type: !53)
185  !62 = !DILocation(line: 0, scope: !12)
186  !63 = !DILocation(line: 0, scope: !44)
187  !64 = !{!65, !66, i64 2}
188  !65 = !{!"arm_2d_size_t", !66, i64 0, !66, i64 2}
189  !66 = !{!"short", !67, i64 0}
190  !67 = !{!"omnipotent char", !68, i64 0}
191  !68 = !{!"Simple C/C++ TBAA"}
192  !69 = !DILocation(line: 74, column: 32, scope: !48)
193  !70 = !DILocation(line: 74, column: 5, scope: !44)
194  !71 = !DILocation(line: 72, column: 47, scope: !12)
195  !72 = !{!65, !66, i64 0}
196  !73 = !DILocation(line: 72, column: 32, scope: !12)
197  !74 = !DILocation(line: 93, column: 1, scope: !12)
198  !75 = !DILocation(line: 0, scope: !47)
199  !76 = !DILocation(line: 80, column: 9, scope: !47)
200  !77 = !DILocation(line: 81, column: 33, scope: !59)
201  !78 = !DILocation(line: 0, scope: !59)
202  !79 = !DILocation(line: 83, column: 18, scope: !59)
203  !80 = !DILocation(line: 84, column: 22, scope: !59)
204  !81 = !DILocation(line: 85, column: 17, scope: !59)
205  !82 = !DILocation(line: 86, column: 13, scope: !59)
206  !83 = !DILocation(line: 87, column: 18, scope: !59)
207  !84 = !DILocation(line: 88, column: 22, scope: !59)
208  !85 = !DILocation(line: 89, column: 9, scope: !59)
209  !86 = distinct !{!86, !76, !87, !88}
210  !87 = !DILocation(line: 89, column: 40, scope: !47)
211  !88 = !{!"llvm.loop.mustprogress"}
212  !89 = !DILocation(line: 90, column: 17, scope: !47)
213  !90 = !DILocation(line: 91, column: 17, scope: !47)
214  !91 = !DILocation(line: 74, column: 59, scope: !48)
215  !92 = distinct !{!92, !70, !93, !88}
216  !93 = !DILocation(line: 92, column: 5, scope: !44)
217
218...
219---
220name:            __arm_2d_impl_rgb16_cl_key_1x1_paving_x_mirror_xx
221alignment:       2
222tracksRegLiveness: true
223liveins:
224  - { reg: '$r0', virtual-reg: '' }
225  - { reg: '$r1', virtual-reg: '' }
226  - { reg: '$r2', virtual-reg: '' }
227  - { reg: '$r3', virtual-reg: '' }
228frameInfo:
229  isFrameAddressTaken: false
230  isReturnAddressTaken: false
231  hasStackMap:     false
232  hasPatchPoint:   false
233  stackSize:       40
234  offsetAdjustment: -32
235  maxAlignment:    4
236  adjustsStack:    false
237  hasCalls:        false
238  stackProtector:  ''
239  maxCallFrameSize: 0
240  cvBytesOfCalleeSavedRegisters: 0
241  hasOpaqueSPAdjustment: false
242  hasVAStart:      false
243  hasMustTailInVarArgFunc: false
244  hasTailCall:     false
245  localFrameSize:  0
246  savePoint:       ''
247  restorePoint:    ''
248fixedStack:
249  - { id: 0, type: default, offset: 8, size: 4, alignment: 8, stack-id: default,
250      isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
251      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
252  - { id: 1, type: default, offset: 4, size: 4, alignment: 4, stack-id: default,
253      isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
254      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
255  - { id: 2, type: default, offset: 0, size: 4, alignment: 8, stack-id: default,
256      isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
257      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
258stack:
259  - { id: 0, name: '', type: spill-slot, offset: -40, size: 4, alignment: 4,
260      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
261      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
262  - { id: 1, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
263      stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
264      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
265  - { id: 2, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
266      stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true,
267      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
268  - { id: 3, name: '', type: spill-slot, offset: -12, size: 4, alignment: 4,
269      stack-id: default, callee-saved-register: '$r6', callee-saved-restored: true,
270      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
271  - { id: 4, name: '', type: spill-slot, offset: -16, size: 4, alignment: 4,
272      stack-id: default, callee-saved-register: '$r5', callee-saved-restored: true,
273      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
274  - { id: 5, name: '', type: spill-slot, offset: -20, size: 4, alignment: 4,
275      stack-id: default, callee-saved-register: '$r4', callee-saved-restored: true,
276      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
277  - { id: 6, name: '', type: spill-slot, offset: -24, size: 4, alignment: 4,
278      stack-id: default, callee-saved-register: '$r11', callee-saved-restored: true,
279      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
280  - { id: 7, name: '', type: spill-slot, offset: -28, size: 4, alignment: 4,
281      stack-id: default, callee-saved-register: '$r10', callee-saved-restored: true,
282      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
283  - { id: 8, name: '', type: spill-slot, offset: -32, size: 4, alignment: 4,
284      stack-id: default, callee-saved-register: '$r9', callee-saved-restored: true,
285      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
286  - { id: 9, name: '', type: spill-slot, offset: -36, size: 4, alignment: 4,
287      stack-id: default, callee-saved-register: '$r8', callee-saved-restored: true,
288      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
289body:             |
290  ; CHECK-LABEL: name: __arm_2d_impl_rgb16_cl_key_1x1_paving_x_mirror_xx
291  ; CHECK:   early-clobber renamable $q2 = MVE_VLDRHU16_rq renamable $r0, killed renamable $q1, 0, $noreg, renamable $lr, debug-location !DILocation(line: 83, column: 18, scope: {{.*}}) :: (load (s128), align 1)
292  ; CHECK:   renamable $q1, renamable $r8 = MVE_VDDUPu16 killed renamable $r8, 1, 0, $noreg, renamable $lr, undef renamable $q1, debug-location !DILocation(line: 84, column: 22, scope: {{.*}})
293  ; CHECK:   MVE_VPTv8i16r 8, renamable $q2, renamable $r11, 1, implicit-def $vpr, debug-location !DILocation(line: 85, column: 17, scope: {{.*}})
294  ; CHECK:   renamable $r6 = MVE_VSTRHU16_post killed renamable $q2, killed renamable $r6, 16, 1, killed renamable $vpr, renamable $lr, debug-location !DILocation(line: 86, column: 13, scope: {{.*}}) :: (store (s128) into %ir.pDst.01, align 2)
295  ; CHECK:   $lr = MVE_LETP killed renamable $lr, %bb.3, debug-location !DILocation(line: 89, column: 9, scope: {{.*}})
296  bb.0.entry:
297    successors: %bb.1(0x50000000), %bb.5(0x30000000)
298    liveins: $r0, $r1, $r2, $r3, $r4, $r5, $r6, $lr, $r8, $r9, $r10, $r11
299
300    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
301    DBG_VALUE $r1, $noreg, !34, !DIExpression(), debug-location !62
302    DBG_VALUE $r2, $noreg, !35, !DIExpression(), debug-location !62
303    DBG_VALUE $r3, $noreg, !36, !DIExpression(), debug-location !62
304    frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $r5, killed $r6, $r7, killed $lr, implicit-def $sp, implicit $sp
305    frame-setup CFI_INSTRUCTION def_cfa_offset 20
306    frame-setup CFI_INSTRUCTION offset $lr, -4
307    frame-setup CFI_INSTRUCTION offset $r7, -8
308    frame-setup CFI_INSTRUCTION offset $r6, -12
309    frame-setup CFI_INSTRUCTION offset $r5, -16
310    frame-setup CFI_INSTRUCTION offset $r4, -20
311    $r7 = frame-setup tADDrSPi $sp, 3, 14 /* CC::al */, $noreg
312    frame-setup CFI_INSTRUCTION def_cfa $r7, 8
313    $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r8, killed $r9, killed $r10, killed $r11
314    frame-setup CFI_INSTRUCTION offset $r11, -24
315    frame-setup CFI_INSTRUCTION offset $r10, -28
316    frame-setup CFI_INSTRUCTION offset $r9, -32
317    frame-setup CFI_INSTRUCTION offset $r8, -36
318    DBG_VALUE $r7, 0, !37, !DIExpression(DW_OP_plus_uconst, 8), debug-location !62
319    DBG_VALUE $r7, 0, !38, !DIExpression(DW_OP_plus_uconst, 12), debug-location !62
320    early-clobber $sp = t2STR_PRE killed $r3, $sp, -4, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
321    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
322    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
323    renamable $r6 = tLDRi $r7, 3, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.1)
324    DBG_VALUE 0, $noreg, !43, !DIExpression(), debug-location !63
325    DBG_VALUE $noreg, $noreg, !40, !DIExpression(DW_OP_LLVM_convert, 16, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value), debug-location !62
326    renamable $r3 = t2LDRSHi12 renamable $r6, 2, 14 /* CC::al */, $noreg :: (load (s16) from %ir.iHeight, !tbaa !64)
327    DBG_VALUE $noreg, $noreg, !35, !DIExpression(), debug-location !62
328    DBG_VALUE $noreg, $noreg, !34, !DIExpression(), debug-location !62
329    DBG_VALUE $noreg, $noreg, !33, !DIExpression(), debug-location !62
330    tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr, debug-location !70
331    DBG_VALUE $noreg, $noreg, !39, !DIExpression(), debug-location !62
332    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
333    tBcc %bb.5, 11 /* CC::lt */, killed $cpsr, debug-location !70
334
335  bb.1.for.body.lr.ph:
336    successors: %bb.2(0x80000000)
337    liveins: $r0, $r1, $r2, $r3, $r6
338
339    DBG_VALUE 0, $noreg, !43, !DIExpression(), debug-location !63
340    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
341    DBG_VALUE $r7, 0, !38, !DIExpression(DW_OP_plus_uconst, 12), debug-location !62
342    DBG_VALUE $r7, 0, !37, !DIExpression(DW_OP_plus_uconst, 8), debug-location !62
343    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
344    renamable $r10 = t2LDRSHi12 killed renamable $r6, 0, 14 /* CC::al */, $noreg :: (load (s16) from %ir.iWidth33, !tbaa !72)
345    renamable $r5 = tLDRi $r7, 2, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.2, align 8)
346    $r6 = tMOVr $r10, 14 /* CC::al */, $noreg, debug-location !70
347    renamable $r5 = t2LDRSHi12 killed renamable $r5, 0, 14 /* CC::al */, $noreg, debug-location !71 :: (load (s16) from %ir.iWidth2, !tbaa !72)
348    DBG_VALUE $r5, $noreg, !40, !DIExpression(), debug-location !62
349    t2CMPri renamable $r10, 8, 14 /* CC::al */, $noreg, implicit-def $cpsr, debug-location !70
350    t2IT 10, 8, implicit-def $itstate, debug-location !70
351    renamable $r6 = tMOVi8 $noreg, 8, 10 /* CC::ge */, killed $cpsr, implicit killed renamable $r6, implicit killed $itstate, debug-location !70
352    renamable $r6 = t2SUBrr renamable $r10, killed renamable $r6, 14 /* CC::al */, $noreg, $noreg, debug-location !70
353    renamable $r11 = t2LDRi12 $r7, 16, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
354    DBG_VALUE $r11, $noreg, !39, !DIExpression(), debug-location !62
355    renamable $r12 = nsw t2SUBri killed renamable $r5, 1, 14 /* CC::al */, $noreg, $noreg
356    renamable $r6, dead $cpsr = tADDi8 killed renamable $r6, 7, 14 /* CC::al */, $noreg, debug-location !70
357    renamable $r5, dead $cpsr = tMOVi8 1, 14 /* CC::al */, $noreg
358    renamable $q0, renamable $r12 = MVE_VDDUPu16 killed renamable $r12, 1, 0, $noreg, $noreg, undef renamable $q0, debug-location !62
359    renamable $r9 = nuw nsw t2ADDrs killed renamable $r5, killed renamable $r6, 27, 14 /* CC::al */, $noreg, $noreg, debug-location !70
360    renamable $r4, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
361
362  bb.2.for.body (align 4):
363    successors: %bb.3(0x80000000)
364    liveins: $q0, $r0, $r1, $r2, $r3, $r4, $r9, $r10, $r11, $r12
365
366    DBG_VALUE $r11, $noreg, !39, !DIExpression(), debug-location !62
367    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
368    DBG_VALUE $r7, 0, !38, !DIExpression(DW_OP_plus_uconst, 12), debug-location !62
369    DBG_VALUE $r7, 0, !37, !DIExpression(DW_OP_plus_uconst, 8), debug-location !62
370    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
371    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
372    DBG_VALUE $r2, $noreg, !35, !DIExpression(), debug-location !62
373    DBG_VALUE $r4, $noreg, !43, !DIExpression(), debug-location !63
374    DBG_VALUE $r2, $noreg, !46, !DIExpression(), debug-location !75
375    DBG_VALUE $r0, $noreg, !49, !DIExpression(), debug-location !75
376    DBG_VALUE $r10, $noreg, !50, !DIExpression(), debug-location !75
377    DBG_VALUE $noreg, $noreg, !51, !DIExpression(), debug-location !75
378    DBG_VALUE $noreg, $noreg, !52, !DIExpression(), debug-location !75
379    $r6 = tMOVr $r2, 14 /* CC::al */, $noreg
380    $r5 = tMOVr $r10, 14 /* CC::al */, $noreg
381    $q1 = MVE_VORR $q0, $q0, 0, $noreg, $noreg, undef $q1
382    $r8 = tMOVr $r12, 14 /* CC::al */, $noreg
383    renamable $lr = t2DoLoopStartTP renamable $r9, renamable $r10, debug-location !76
384
385  bb.3.do.body (align 4):
386    successors: %bb.3(0x7c000000), %bb.4(0x04000000)
387    liveins: $lr, $q0, $q1, $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r8, $r9, $r10, $r11, $r12
388
389    DBG_VALUE $r0, $noreg, !49, !DIExpression(), debug-location !75
390    DBG_VALUE $r4, $noreg, !43, !DIExpression(), debug-location !63
391    DBG_VALUE $r11, $noreg, !39, !DIExpression(), debug-location !62
392    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
393    DBG_VALUE $r7, 0, !38, !DIExpression(DW_OP_plus_uconst, 12), debug-location !62
394    DBG_VALUE $r7, 0, !37, !DIExpression(DW_OP_plus_uconst, 8), debug-location !62
395    DBG_VALUE $r2, $noreg, !35, !DIExpression(), debug-location !62
396    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
397    DBG_VALUE $r6, $noreg, !46, !DIExpression(), debug-location !75
398    DBG_VALUE $r5, $noreg, !50, !DIExpression(), debug-location !75
399    DBG_VALUE $r8, $noreg, !51, !DIExpression(), debug-location !75
400    DBG_VALUE $q1, $noreg, !52, !DIExpression(), debug-location !75
401    renamable $vpr = MVE_VCTP16 renamable $r5, 0, $noreg, $noreg, debug-location !77
402    DBG_VALUE $noreg, $noreg, !58, !DIExpression(), debug-location !78
403    MVE_VPST 1, implicit $vpr, debug-location !79
404    early-clobber renamable $q2 = MVE_VLDRHU16_rq renamable $r0, killed renamable $q1, 1, renamable $vpr, renamable $lr, debug-location !79 :: (load (s128), align 1)
405    DBG_VALUE $q2, $noreg, !61, !DIExpression(), debug-location !78
406    renamable $q1, renamable $r8 = MVE_VDDUPu16 killed renamable $r8, 1, 1, renamable $vpr, renamable $lr, undef renamable $q1, debug-location !80
407    DBG_VALUE $noreg, $noreg, !52, !DIExpression(), debug-location !75
408    DBG_VALUE $noreg, $noreg, !51, !DIExpression(), debug-location !75
409    renamable $vpr = MVE_VCMPi16r renamable $q2, renamable $r11, 1, 1, killed renamable $vpr, renamable $lr, debug-location !81
410    DBG_VALUE $noreg, $noreg, !58, !DIExpression(DW_OP_LLVM_convert, 32, DW_ATE_unsigned, DW_OP_LLVM_convert, 16, DW_ATE_unsigned, DW_OP_stack_value), debug-location !78
411    renamable $r6 = MVE_VSTRHU16_post killed renamable $q2, killed renamable $r6, 16, 1, killed renamable $vpr, renamable $lr, debug-location !82 :: (store (s128) into %ir.pDst.01, align 2)
412    DBG_VALUE $r6, $noreg, !46, !DIExpression(), debug-location !75
413    renamable $r5, dead $cpsr = nsw tSUBi8 killed renamable $r5, 8, 14 /* CC::al */, $noreg, debug-location !84
414    DBG_VALUE $r5, $noreg, !50, !DIExpression(), debug-location !75
415    renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr, debug-location !85
416    tB %bb.4, 14 /* CC::al */, $noreg, debug-location !85
417
418  bb.4.do.end:
419    successors: %bb.5(0x04000000), %bb.2(0x7c000000)
420    liveins: $q0, $r0, $r1, $r2, $r3, $r4, $r9, $r10, $r11, $r12
421
422    DBG_VALUE $r5, $noreg, !50, !DIExpression(), debug-location !75
423    DBG_VALUE $r6, $noreg, !46, !DIExpression(), debug-location !75
424    DBG_VALUE $r0, $noreg, !49, !DIExpression(), debug-location !75
425    DBG_VALUE $r4, $noreg, !43, !DIExpression(), debug-location !63
426    DBG_VALUE $r11, $noreg, !39, !DIExpression(), debug-location !62
427    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
428    DBG_VALUE $r7, 0, !38, !DIExpression(DW_OP_plus_uconst, 12), debug-location !62
429    DBG_VALUE $r7, 0, !37, !DIExpression(DW_OP_plus_uconst, 8), debug-location !62
430    DBG_VALUE $r2, $noreg, !35, !DIExpression(), debug-location !62
431    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
432    renamable $r6 = tLDRspi $sp, 0, 14 /* CC::al */, $noreg, debug-location !90 :: (load (s32) from %stack.0)
433    renamable $r4, dead $cpsr = nuw nsw tADDi8 killed renamable $r4, 1, 14 /* CC::al */, $noreg, debug-location !91
434    DBG_VALUE $r4, $noreg, !43, !DIExpression(), debug-location !63
435    renamable $r0 = t2ADDrs killed renamable $r0, renamable $r1, 10, 14 /* CC::al */, $noreg, $noreg, debug-location !89
436    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
437    tCMPr renamable $r4, renamable $r3, 14 /* CC::al */, $noreg, implicit-def $cpsr, debug-location !70
438    renamable $r2 = t2ADDrs killed renamable $r2, killed renamable $r6, 10, 14 /* CC::al */, $noreg, $noreg, debug-location !90
439    DBG_VALUE $r2, $noreg, !35, !DIExpression(), debug-location !62
440    tBcc %bb.2, 1 /* CC::ne */, killed $cpsr, debug-location !70
441
442  bb.5.for.cond.cleanup:
443    DBG_VALUE $sp, 0, !36, !DIExpression(), debug-location !62
444    DBG_VALUE $r7, 0, !38, !DIExpression(DW_OP_plus_uconst, 12), debug-location !62
445    DBG_VALUE $r7, 0, !37, !DIExpression(DW_OP_plus_uconst, 8), debug-location !62
446    DBG_VALUE $r0, $noreg, !33, !DIExpression(), debug-location !62
447    $sp = frame-destroy tADDspi $sp, 1, 14 /* CC::al */, $noreg, debug-location !74
448    $sp = frame-destroy t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r8, def $r9, def $r10, def $r11, debug-location !74
449    frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $r5, def $r6, def $r7, def $pc, debug-location !74
450
451...
452