brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 4990979 Raw
60 lines · plain
1; RUN: opt -passes=check-debugify < %s 2>&1 | FileCheck %s2 3define <2 x i64> @test-fun(<2 x i64> %A) !dbg !6 {4  %and = and <2 x i64> %A, <i64 23, i64 42>, !dbg !145 6; CHECK: ERROR: dbg.value operand has size 128, but its variable has size 2567  call void @llvm.dbg.value(metadata <2 x i64> %and, metadata !12, metadata !DIExpression()), !dbg !158 9; CHECK: ERROR: dbg.value operand has size 512, but its variable has size 25610  call void @llvm.dbg.value(metadata <2 x i256> zeroinitializer, metadata !12, metadata !DIExpression()), !dbg !1511 12; CHECK: ERROR: dbg.value operand has size 8, but its variable has size 25613  call void @llvm.dbg.value(metadata i8 0, metadata !12, metadata !DIExpression()), !dbg !1514 15; Assume the debugger implicitly uses the lower 256 bits.16; CHECK-NOT: ERROR: dbg.value operand has size 512, but its variable has size 25617  call void @llvm.dbg.value(metadata i512 0, metadata !12, metadata !DIExpression()), !dbg !1518 19; Assume the debugger implicitly zero-extends unsigned values.20; CHECK-NOT: ERROR: dbg.value operand has size 4, but its variable has size 3221  call void @llvm.dbg.value(metadata i8 0, metadata !17, metadata !DIExpression()), !dbg !1522 23  ret <2 x i64> %and, !dbg !1624}25; CHECK: CheckModuleDebugify: FAIL26 27; Function Attrs: nounwind readnone speculatable28declare void @llvm.dbg.value(metadata, metadata, metadata) #029 30attributes #0 = { nounwind readnone speculatable }31 32!llvm.dbg.cu = !{!0}33!llvm.debugify = !{!3, !4}34!llvm.module.flags = !{!5}35 36!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)37!1 = !DIFile(filename: "/Users/vsk/src/llvm.org-main/llvm/test/DebugInfo/debugify-bogus-dbg-value.ll", directory: "/")38!2 = !{}39!3 = !{i32 4}40!4 = !{i32 4}41!5 = !{i32 2, !"Debug Info Version", i32 3}42!6 = distinct !DISubprogram(name: "test-fun", linkageName: "test-fun", scope: null, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !8)43!7 = !DISubroutineType(types: !2)44!8 = !{!9, !11, !12}45!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)46!10 = !DIBasicType(name: "ty64", size: 64, encoding: DW_ATE_signed)47!11 = !DILocalVariable(name: "2", scope: !6, file: !1, line: 2, type: !10)48!12 = !DILocalVariable(name: "3", scope: !6, file: !1, line: 3, type: !13)49 50; Set the size here to an incorrect value to check that the size diagnostic51; triggers.52!13 = !DIBasicType(name: "ty128", size: 256, encoding: DW_ATE_signed)53 54!14 = !DILocation(line: 2, column: 1, scope: !6)55!15 = !DILocation(line: 3, column: 1, scope: !6)56!16 = !DILocation(line: 4, column: 1, scope: !6)57 58!17 = !DILocalVariable(name: "4", scope: !6, file: !1, line: 3, type: !18)59!18 = !DIBasicType(name: "ty32_unsigned", size: 32, encoding: DW_ATE_unsigned)60