blob: 2d4dc6b0a2789e69d75873ac3e6f123929b9186d [file] [log] [blame]
Mehdi Amini89bf9692016-12-28 22:30:28 +00001; RUN: llvm-as <%s -bitcode-mdindex-threshold=0 | llvm-bcanalyzer -dump | FileCheck %s
Duncan P. N. Exon Smithe7a2c972016-04-23 04:42:39 +00002; Check that distinct nodes are emitted before uniqued nodes, even if that
3; breaks post-order traversals.
4
5; Nodes in this testcase are numbered to match how they are referenced in
6; bitcode. !1 is referenced as opN=1.
7
8; CHECK: <DISTINCT_NODE op0=2/>
9!1 = distinct !{!2}
10
11; CHECK-NEXT: <NODE op0=1/>
12!2 = !{!1}
13
Mehdi Amini89bf9692016-12-28 22:30:28 +000014; Before the named records we emit the index containing the position of the
15; previously emitted records
16; CHECK-NEXT: <INDEX {{.*}} (offset match)
17
Duncan P. N. Exon Smithe7a2c972016-04-23 04:42:39 +000018; Note: named metadata nodes are not cannot reference null so their operands
19; are numbered off-by-one.
20; CHECK-NEXT: <NAME
21; CHECK-NEXT: <NAMED_NODE op0=1/>
22!named = !{!2}