File: drop-debug-loc-when-speculating.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 (39 lines) | stat: -rw-r--r-- 1,541 bytes parent folder | download | duplicates (12)
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
; RUN: opt -S -o - %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s

declare i1 @make_condition()

; CHECK-LABEL: @test1(
; CHECK: and i1 [[COND:%.*]], [[COND]]{{$}}
; CHECK: select i1 [[COND]]
define void @test1() !dbg !6 {
start:
  %cond = call i1 @make_condition(), !dbg !8
  br i1 %cond, label %then, label %else, !dbg !9

then:                                             ; preds = %start
  %and = and i1 %cond, %cond, !dbg !10
  br label %else, !dbg !11

else:                                             ; preds = %then, %start
  %phi = phi i1 [ %cond, %start ], [ %and, %then ], !dbg !12
  ret void, !dbg !13
}

!llvm.dbg.cu = !{!0}
!llvm.debugify = !{!3, !4}
!llvm.module.flags = !{!5}

!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "test.ll", directory: "/")
!2 = !{}
!3 = !{i32 6}
!4 = !{i32 0}
!5 = !{i32 2, !"Debug Info Version", i32 3}
!6 = distinct !DISubprogram(name: "test1", linkageName: "test1", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
!7 = !DISubroutineType(types: !2)
!8 = !DILocation(line: 1, column: 1, scope: !6)
!9 = !DILocation(line: 2, column: 1, scope: !6)
!10 = !DILocation(line: 3, column: 2, scope: !6)
!11 = !DILocation(line: 4, column: 2, scope: !6)
!12 = !DILocation(line: 5, column: 3, scope: !6)
!13 = !DILocation(line: 6, column: 3, scope: !6)