brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 319350e Raw
47 lines · plain
1; RUN: opt < %s -S -passes=jump-threading | FileCheck %s2 3; Test that JumpThreading's `simplifyPartiallyRedundantLoad` propagates4; the debug location to the `bitcast` from the LoadInst it replaces (`%b`).5 6declare void @f1(...)7 8define void @test8(ptr %0, ptr %1, ptr %2) !dbg !5 {9; CHECK: @test810; CHECK:    [[TMP4:%.*]] = bitcast float [[A:%.*]] to i32, !dbg [[DBG9:![0-9]+]]11; CHECK: [[DBG9]] = !DILocation(line: 2,12;13  %a = load float, ptr %0, align 4, !dbg !814  %b = load i32, ptr %0, align 4, !dbg !915  store float %a, ptr %1, align 4, !dbg !1016  %c = icmp eq i32 %b, 8, !dbg !1117  br i1 %c, label %ret1, label %ret2, !dbg !1218 19ret1:                                             ; preds = %320  ret void, !dbg !1321 22ret2:                                             ; preds = %323  %xxx = tail call i32 (...) @f1() #0, !dbg !1424  ret void, !dbg !1525}26 27!llvm.dbg.cu = !{!0}28!llvm.debugify = !{!2, !3}29!llvm.module.flags = !{!4}30 31!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)32!1 = !DIFile(filename: "test.ll", directory: "/")33!2 = !{i32 8}34!3 = !{i32 0}35!4 = !{i32 2, !"Debug Info Version", i32 3}36!5 = distinct !DISubprogram(name: "test8", linkageName: "test8", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)37!6 = !DISubroutineType(types: !7)38!7 = !{}39!8 = !DILocation(line: 1, column: 1, scope: !5)40!9 = !DILocation(line: 2, column: 1, scope: !5)41!10 = !DILocation(line: 3, column: 1, scope: !5)42!11 = !DILocation(line: 4, column: 1, scope: !5)43!12 = !DILocation(line: 5, column: 1, scope: !5)44!13 = !DILocation(line: 6, column: 1, scope: !5)45!14 = !DILocation(line: 7, column: 1, scope: !5)46!15 = !DILocation(line: 8, column: 1, scope: !5)47