1*e98f9258SMehdi Amini; RUN: llvm-as <%s -bitcode-mdindex-threshold=0 | llvm-bcanalyzer -dump | FileCheck %s 21483fff2SDuncan P. N. Exon Smith; Check that distinct nodes are emitted before uniqued nodes, even if that 31483fff2SDuncan P. N. Exon Smith; breaks post-order traversals. 41483fff2SDuncan P. N. Exon Smith 51483fff2SDuncan P. N. Exon Smith; Nodes in this testcase are numbered to match how they are referenced in 61483fff2SDuncan P. N. Exon Smith; bitcode. !1 is referenced as opN=1. 71483fff2SDuncan P. N. Exon Smith 81483fff2SDuncan P. N. Exon Smith; CHECK: <DISTINCT_NODE op0=2/> 91483fff2SDuncan P. N. Exon Smith!1 = distinct !{!2} 101483fff2SDuncan P. N. Exon Smith 111483fff2SDuncan P. N. Exon Smith; CHECK-NEXT: <NODE op0=1/> 121483fff2SDuncan P. N. Exon Smith!2 = !{!1} 131483fff2SDuncan P. N. Exon Smith 14*e98f9258SMehdi Amini; Before the named records we emit the index containing the position of the 15*e98f9258SMehdi Amini; previously emitted records 16*e98f9258SMehdi Amini; CHECK-NEXT: <INDEX {{.*}} (offset match) 17*e98f9258SMehdi Amini 181483fff2SDuncan P. N. Exon Smith; Note: named metadata nodes are not cannot reference null so their operands 191483fff2SDuncan P. N. Exon Smith; are numbered off-by-one. 201483fff2SDuncan P. N. Exon Smith; CHECK-NEXT: <NAME 211483fff2SDuncan P. N. Exon Smith; CHECK-NEXT: <NAMED_NODE op0=1/> 221483fff2SDuncan P. N. Exon Smith!named = !{!2} 23