blob: 1d146817e6b03216d29a71373f928765c4b90765 [file] [log] [blame]
Duncan P. N. Exon Smith1483fff2016-04-23 04:42:39 +00001; RUN: llvm-as <%s | llvm-bcanalyzer -dump | FileCheck %s
2; 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
14; Note: named metadata nodes are not cannot reference null so their operands
15; are numbered off-by-one.
16; CHECK-NEXT: <NAME
17; CHECK-NEXT: <NAMED_NODE op0=1/>
18!named = !{!2}