1 ; RUN: llc -O2 -o %t1.o < %s
2 ; RUN: llc -O2 -o %t2.o < %s
3 ; RUN: llc -O2 -o %t3.o < %s
4 ; RUN: llc -O2 -o %t4.o < %s
5 ; RUN: llc -O2 -o %t5.o < %s
11 ; Regression test for nondeterminism introduced in https://reviews.llvm.org/D57694
13 define void @test(i32 %x) !dbg !4 {
15 call void @llvm.dbg.value(metadata void (i32)* @f1, metadata !6, metadata !DIExpression()), !dbg !8
16 call void @llvm.dbg.value(metadata void (i32)* @f2, metadata !7, metadata !DIExpression()), !dbg !8
17 %cmp = icmp eq i32 %x, 0, !dbg !8
18 br i1 %cmp, label %cleanup, label %if.end
21 %tobool = icmp eq i32 0, 0
22 %a = select i1 %tobool, void (i32)* @f1, void (i32)* null, !dbg !8
23 %b = select i1 %tobool, void (i32)* @f2, void (i32)* null, !dbg !8
35 declare void @llvm.dbg.value(metadata, metadata, metadata)
38 !llvm.module.flags = !{!3}
40 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang", runtimeVersion: 0, emissionKind: FullDebug)
41 !1 = !DIFile(filename: "test.cc", directory: "")
43 !3 = !{i32 2, !"Debug Info Version", i32 3}
44 !4 = distinct !DISubprogram(name: "test", scope: !1, file: !1, type: !5, unit: !0)
45 !5 = !DISubroutineType(types: !2)
46 !6 = !DILocalVariable(name: "a", scope: !4, file: !1, type: !9)
47 !7 = !DILocalVariable(name: "b", scope: !4, file: !1, type: !9)
48 !8 = !DILocation(scope: !4)
49 !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64)