1 ; RUN: opt < %s -codegenprepare -S -mtriple=x86_64-unknown-unknown | FileCheck %s --match-full-lines
3 ; Make sure the promoted trunc doesn't get a debug location associated.
4 ; CHECK: %promoted3 = trunc i32 %or to i16
6 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
7 target triple = "x86_64-apple-macosx10.13.0"
9 @b = global i16 0, align 2
11 declare void @bar(i64)
13 define i32 @foo(i16 %kkk) !dbg !6 {
15 %t4 = load i16, ptr @b, align 2, !dbg !8
16 %conv4 = zext i16 %t4 to i32, !dbg !9
17 %or = or i16 %kkk, %t4, !dbg !10
18 %c = sext i16 %or to i64, !dbg !11
19 call void @bar(i64 %c), !dbg !12
20 %t5 = and i16 %or, 5, !dbg !13
21 %z = zext i16 %t5 to i32, !dbg !14
26 !llvm.debugify = !{!3, !4}
27 !llvm.module.flags = !{!5}
29 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
30 !1 = !DIFile(filename: "/Users/davide/work/llvm-project/patatino.ll", directory: "/")
34 !5 = !{i32 2, !"Debug Info Version", i32 3}
35 !6 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
36 !7 = !DISubroutineType(types: !2)
37 !8 = !DILocation(line: 1, column: 1, scope: !6)
38 !9 = !DILocation(line: 2, column: 1, scope: !6)
39 !10 = !DILocation(line: 3, column: 1, scope: !6)
40 !11 = !DILocation(line: 4, column: 1, scope: !6)
41 !12 = !DILocation(line: 5, column: 1, scope: !6)
42 !13 = !DILocation(line: 6, column: 1, scope: !6)
43 !14 = !DILocation(line: 7, column: 1, scope: !6)
44 !15 = !DILocation(line: 8, column: 1, scope: !6)