xref: /llvm-project/llvm/test/Transforms/CodeGenPrepare/X86/promoted-zext-debugloc.ll (revision c9832da35092e8733d505a4856f2b3dca5bd05b1)
1; RUN: opt < %s -codegenprepare -S -mtriple=x86_64-unknown-unknown | FileCheck %s --match-full-lines
2
3; Make sure the promoted zext doesn't get a debug location associated.
4; CHECK: %promoted1 = zext i8 %t to i64
5
6define void @patatino(ptr %p, ptr %q, i32 %b, ptr %addr) !dbg !6 {
7entry:
8  %t = load i8, ptr %p, align 1, !dbg !8
9  %zextt = zext i8 %t to i32, !dbg !9
10  %add = add nuw i32 %zextt, %b, !dbg !10
11  %add2 = add nuw i32 %zextt, 12, !dbg !11
12  store i32 %add, ptr %addr, align 4, !dbg !12
13  %s = zext i32 %add2 to i64, !dbg !13
14  store i64 %s, ptr %q, align 4, !dbg !14
15  ret void, !dbg !15
16}
17
18!llvm.dbg.cu = !{!0}
19!llvm.debugify = !{!3, !4}
20!llvm.module.flags = !{!5}
21
22!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
23!1 = !DIFile(filename: "a2.ll", directory: "/")
24!2 = !{}
25!3 = !{i32 8}
26!4 = !{i32 0}
27!5 = !{i32 2, !"Debug Info Version", i32 3}
28!6 = distinct !DISubprogram(name: "patatino", linkageName: "patatino", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
29!7 = !DISubroutineType(types: !2)
30!8 = !DILocation(line: 1, column: 1, scope: !6)
31!9 = !DILocation(line: 2, column: 1, scope: !6)
32!10 = !DILocation(line: 3, column: 1, scope: !6)
33!11 = !DILocation(line: 4, column: 1, scope: !6)
34!12 = !DILocation(line: 5, column: 1, scope: !6)
35!13 = !DILocation(line: 6, column: 1, scope: !6)
36!14 = !DILocation(line: 7, column: 1, scope: !6)
37!15 = !DILocation(line: 8, column: 1, scope: !6)
38