File: scalable-vectors.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (54 lines) | stat: -rw-r--r-- 2,681 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s


; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s

;; Hand written. Check AssignmentTrackingAnalysis doesn't try to get the size
;; of scalable vectors (which causes an assertion failure).

; CHECK: DBG_VALUE %stack.0, $noreg, ![[#]], !DIExpression(DW_OP_deref)
; CHECK: DBG_VALUE i256 0, $noreg, ![[#]], !DIExpression()
;; FIXME: We should reinstate (or poison) the variable at the store. See
;; llvm.org/PR62346.

target triple = "aarch64"

define dso_local void @square(ptr %0) local_unnamed_addr #0 !dbg !9 {
entry:
   %1 = alloca <32 x i8>, !DIAssignID !18
   call void @llvm.dbg.assign(metadata i1 poison, metadata !19, metadata !DIExpression(), metadata !18, metadata ptr %1, metadata !DIExpression()), !dbg !21
   %2 = load <vscale x 8 x i8>, ptr %0, align 1
   call void @llvm.dbg.assign(metadata i256 0, metadata !19, metadata !DIExpression(), metadata !22, metadata ptr %1, metadata !DIExpression()), !dbg !21
   store <vscale x 8 x i8> %2, ptr %1, align 1
   ret void
}

declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)

attributes #0 = { vscale_range(1,16) "target-cpu"="generic" "target-features"="+sve" }

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2, !3, !7}
!llvm.ident = !{!8}

!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 17.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
!1 = !DIFile(filename: "/app/example.c", directory: "/app")
!2 = !{i32 7, !"Dwarf Version", i32 4}
!3 = !{i32 2, !"Debug Info Version", i32 3}
!7 = !{i32 7, !"debug-info-assignment-tracking", i1 true}
!8 = !{!"clang version 17.0.0"}
!9 = distinct !DISubprogram(name: "square", scope: !10, file: !10, line: 1, type: !11, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17)
!10 = !DIFile(filename: "example.c", directory: "/app")
!11 = !DISubroutineType(types: !12)
!12 = !{null, !13, !14, !16}
!13 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !14)
!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !15, size: 64)
!15 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char)
!16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!17 = !{}
!18 =  distinct !DIAssignID()
!19 = !DILocalVariable(name: "i", scope: !9, file: !10, line: 2, type: !20)
!20 = !DIBasicType(name: "cats", size: 256, encoding: DW_ATE_signed)
!21 = !DILocation(line: 0, scope: !9)
!22 =  distinct !DIAssignID()