blob: 397925dbb645bbf7f8ed24f5308191449b12906f [file] [log] [blame]
Keno Fischer1dd319f2016-01-14 19:12:27 +00001; RUN: opt -instcombine -S %s | FileCheck %s
2
3%foo = type { i8 }
4
5; Function Attrs: nounwind uwtable
6define void @_ZN4llvm13ScaledNumbers10multiply64Emm() {
7entry:
8 %getU = alloca %foo, align 1
9; This is supposed to make sure that the declare conversion, does not accidentally think the store OF
10; %getU is a store TO %getU. There are valid reasons to have an llvm.dbg.value here, but if the pass
11; is changed to emit such, a more specific check should be added to make sure that any llvm.dbg.value
12; is correct.
13; CHECK-NOT: @llvm.dbg.value(metadata %foo* %getU
14 call void @llvm.dbg.declare(metadata %foo* %getU, metadata !3, metadata !6), !dbg !7
15 store %foo* %getU, %foo** undef, align 8, !tbaa !8
16 unreachable
17}
18
19; Function Attrs: nounwind readnone
20declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
21
22attributes #1 = { nounwind readnone }
23
24!llvm.dbg.cu = !{!0}
25!llvm.module.flags = !{!2}
26
Adrian Prantl75819ae2016-04-15 15:57:41 +000027!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257597)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
Keno Fischer1dd319f2016-01-14 19:12:27 +000028!1 = !DIFile(filename: "none", directory: ".")
29!2 = !{i32 2, !"Debug Info Version", i32 3}
30!3 = !DILocalVariable(name: "getU", scope: !4, file: !1, line: 25, type: !5)
Adrian Prantl75819ae2016-04-15 15:57:41 +000031!4 = distinct !DISubprogram(name: "multiply64", linkageName: "_ZN4llvm13ScaledNumbers10multiply64Emm", scope: null, file: !1, line: 22, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true, unit: !0)
Keno Fischer1dd319f2016-01-14 19:12:27 +000032!5 = !DICompositeType(tag: DW_TAG_class_type, scope: !4, file: !1, line: 25, size: 8, align: 8)
33!6 = !DIExpression()
34!7 = !DILocation(line: 25, column: 8, scope: !4)
Sanjoy Das3336f682016-12-11 20:07:15 +000035!8 = !{!10, !10, i64 0}
Keno Fischer1dd319f2016-01-14 19:12:27 +000036!9 = !{i64 0}
Sanjoy Das3336f682016-12-11 20:07:15 +000037!10 = !{!"scalar type", !9}