Skip to content

Commit fd27379

Browse files
davemgreentstellar
authored andcommitted
[ARM] MVE VPT block tests with debug info. NFC
1 parent 07234c7 commit fd27379

File tree

1 file changed

+114
-0
lines changed

1 file changed

+114
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -run-pass arm-mve-vpt %s -o - | FileCheck %s
3+
4+
--- |
5+
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
6+
target triple = "thumbv8.1m.main-none-unknown-eabihf"
7+
8+
define <4 x i32> @test(<4 x i32> %x, <4 x i32> %y, <4 x i32> %z) #0 !dbg !5 {
9+
entry:
10+
call void @llvm.dbg.value(metadata <4 x i32> %x, metadata !17, metadata !DIExpression()), !dbg !21
11+
call void @llvm.dbg.value(metadata <4 x i32> %y, metadata !18, metadata !DIExpression()), !dbg !21
12+
call void @llvm.dbg.value(metadata <4 x i32> %z, metadata !19, metadata !DIExpression()), !dbg !21
13+
%0 = icmp sle <4 x i32> %x, %y, !dbg !22
14+
call void @llvm.dbg.value(metadata i32 undef, metadata !20, metadata !DIExpression()), !dbg !21
15+
%1 = tail call <4 x i32> @llvm.arm.mve.add.predicated.v4i32.v4i1(<4 x i32> %x, <4 x i32> %y, <4 x i1> %0, <4 x i32> %z), !dbg !23
16+
call void @llvm.dbg.value(metadata <4 x i32> %1, metadata !19, metadata !DIExpression()), !dbg !21
17+
%2 = icmp sgt <4 x i32> %x, %y, !dbg !24
18+
call void @llvm.dbg.value(metadata i32 undef, metadata !20, metadata !DIExpression()), !dbg !21
19+
%3 = tail call <4 x i32> @llvm.arm.mve.add.predicated.v4i32.v4i1(<4 x i32> %x, <4 x i32> %y, <4 x i1> %2, <4 x i32> %1), !dbg !25
20+
call void @llvm.dbg.value(metadata <4 x i32> %3, metadata !19, metadata !DIExpression()), !dbg !21
21+
ret <4 x i32> %3, !dbg !26
22+
}
23+
24+
declare <4 x i32> @llvm.arm.mve.add.predicated.v4i32.v4i1(<4 x i32>, <4 x i32>, <4 x i1>, <4 x i32>) #1
25+
declare void @llvm.dbg.value(metadata, metadata, metadata) #2
26+
27+
attributes #0 = { "target-features"="+fullfp16,+lob,+mve.fp" }
28+
attributes #1 = { nounwind readnone "target-features"="+fullfp16,+lob,+mve.fp" }
29+
attributes #2 = { nofree nosync nounwind readnone speculatable willreturn "target-features"="+fullfp16,+lob,+mve.fp" }
30+
31+
!llvm.dbg.cu = !{!0}
32+
!llvm.module.flags = !{!3, !4}
33+
34+
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0 (https://github.com/llvm/llvm-project 921572a18dc9b97c259bda2ce8130f04b2ebe3ed)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
35+
!1 = !DIFile(filename: "tmp.c", directory: "/work/llvm-project/build")
36+
!2 = !{}
37+
!3 = !{i32 7, !"Dwarf Version", i32 4}
38+
!4 = !{i32 2, !"Debug Info Version", i32 3}
39+
!5 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 2, type: !6, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !16)
40+
!6 = !DISubroutineType(types: !7)
41+
!7 = !{!8, !8, !8, !8}
42+
!8 = !DIDerivedType(tag: DW_TAG_typedef, name: "int32x4_t", file: !9, line: 28, baseType: !10)
43+
!9 = !DIFile(filename: "lib/clang/13.0.0/include/arm_mve.h", directory: "/work/llvm-project/build")
44+
!10 = !DICompositeType(tag: DW_TAG_array_type, baseType: !11, size: 128, flags: DIFlagVector, elements: !14)
45+
!11 = !DIDerivedType(tag: DW_TAG_typedef, name: "int32_t", file: !12, line: 58, baseType: !13)
46+
!12 = !DIFile(filename: "pb-rel/testabletools/include/stdint.h", directory: "/work")
47+
!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
48+
!14 = !{!15}
49+
!15 = !DISubrange(count: 4)
50+
!16 = !{!17, !18, !19, !20}
51+
!17 = !DILocalVariable(name: "x", arg: 1, scope: !5, file: !1, line: 2, type: !8)
52+
!18 = !DILocalVariable(name: "y", arg: 2, scope: !5, file: !1, line: 2, type: !8)
53+
!19 = !DILocalVariable(name: "z", arg: 3, scope: !5, file: !1, line: 2, type: !8)
54+
!20 = !DILocalVariable(name: "p", scope: !5, file: !1, line: 3, type: !13)
55+
!21 = !DILocation(line: 0, scope: !5)
56+
!22 = !DILocation(line: 3, column: 11, scope: !5)
57+
!23 = !DILocation(line: 4, column: 7, scope: !5)
58+
!24 = !DILocation(line: 5, column: 7, scope: !5)
59+
!25 = !DILocation(line: 6, column: 7, scope: !5)
60+
!26 = !DILocation(line: 7, column: 3, scope: !5)
61+
62+
...
63+
---
64+
name: test
65+
tracksRegLiveness: true
66+
liveins:
67+
- { reg: '$q0', virtual-reg: '' }
68+
- { reg: '$q1', virtual-reg: '' }
69+
- { reg: '$q2', virtual-reg: '' }
70+
body: |
71+
bb.0.entry:
72+
liveins: $q0, $q1, $q2
73+
74+
; CHECK-LABEL: name: test
75+
; CHECK: liveins: $q0, $q1, $q2
76+
; CHECK: DBG_VALUE $q0, $noreg, !17, !DIExpression(), debug-location !21
77+
; CHECK: DBG_VALUE $q0, $noreg, !17, !DIExpression(), debug-location !21
78+
; CHECK: DBG_VALUE $q1, $noreg, !18, !DIExpression(), debug-location !21
79+
; CHECK: DBG_VALUE $q1, $noreg, !18, !DIExpression(), debug-location !21
80+
; CHECK: DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
81+
; CHECK: DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
82+
; CHECK: DBG_VALUE $noreg, $noreg, !20, !DIExpression(), debug-location !21
83+
; CHECK: BUNDLE implicit-def $vpr, implicit-def $q2, implicit-def $d4, implicit-def $s8, implicit-def $s9, implicit-def $d5, implicit-def $s10, implicit-def $s11, implicit $q1, implicit $q0, implicit killed $q2, debug-location !23 {
84+
; CHECK: MVE_VPTv4s32 8, renamable $q1, renamable $q0, 10, implicit-def $vpr, debug-location !23
85+
; CHECK: renamable $q2 = MVE_VADDi32 renamable $q0, renamable $q1, 1, internal renamable $vpr, killed renamable $q2, debug-location !23
86+
; CHECK: }
87+
; CHECK: DBG_VALUE $noreg, $noreg, !20, !DIExpression(), debug-location !21
88+
; CHECK: DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
89+
; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, debug-location !24
90+
; CHECK: BUNDLE implicit-def $q2, implicit-def $d4, implicit-def $s8, implicit-def $s9, implicit-def $d5, implicit-def $s10, implicit-def $s11, implicit killed $vpr, implicit killed $q0, implicit killed $q1, implicit killed $q2, debug-location !25 {
91+
; CHECK: MVE_VPST 8, implicit $vpr, debug-location !25
92+
; CHECK: renamable $q2 = MVE_VADDi32 killed renamable $q0, killed renamable $q1, 1, killed renamable $vpr, killed renamable $q2, debug-location !25
93+
; CHECK: }
94+
; CHECK: DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
95+
; CHECK: $q0 = MVE_VORR killed $q2, killed $q2, 0, $noreg, undef $q0, debug-location !26
96+
; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0, debug-location !26
97+
DBG_VALUE $q0, $noreg, !17, !DIExpression(), debug-location !21
98+
DBG_VALUE $q0, $noreg, !17, !DIExpression(), debug-location !21
99+
DBG_VALUE $q1, $noreg, !18, !DIExpression(), debug-location !21
100+
DBG_VALUE $q1, $noreg, !18, !DIExpression(), debug-location !21
101+
DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
102+
DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
103+
renamable $vpr = MVE_VCMPs32 renamable $q1, renamable $q0, 10, 0, $noreg, debug-location !22
104+
DBG_VALUE $noreg, $noreg, !20, !DIExpression(), debug-location !21
105+
renamable $q2 = MVE_VADDi32 renamable $q0, renamable $q1, 1, renamable $vpr, killed renamable $q2, debug-location !23
106+
DBG_VALUE $noreg, $noreg, !20, !DIExpression(), debug-location !21
107+
DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
108+
renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, debug-location !24
109+
renamable $q2 = MVE_VADDi32 killed renamable $q0, killed renamable $q1, 1, killed renamable $vpr, killed renamable $q2, debug-location !25
110+
DBG_VALUE $q2, $noreg, !19, !DIExpression(), debug-location !21
111+
$q0 = MVE_VORR killed $q2, killed $q2, 0, $noreg, undef $q0, debug-location !26
112+
tBX_RET 14 /* CC::al */, $noreg, implicit $q0, debug-location !26
113+
114+
...

0 commit comments

Comments
 (0)