
Fix llvm.ident exploding when linking many bitcode files in libclc. This should de-duplicate other named metadata as well, e.g. opencl.spir.version and opencl.ocl.version. This PR is a re-submit of https://reviews.llvm.org/D20582 (authored by Matt Arsenault) with update that only checks MD node pointer for duplication according to review comment in that PR. --------- Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
21 lines
631 B
LLVM
21 lines
631 B
LLVM
; RUN: llvm-link %s %S/Inputs/unique-fwd-decl-order.ll -S -o - | FileCheck %s
|
|
; RUN: llvm-link %S/Inputs/unique-fwd-decl-order.ll %s -S -o - | FileCheck %s
|
|
|
|
; This test exercises MDNode hashing. For the nodes to be correctly uniqued,
|
|
; the hash of a to-be-created MDNode has to match the hash of an
|
|
; operand-just-changed MDNode (with the same operands).
|
|
;
|
|
; Note that these two assembly files number the nodes identically, even though
|
|
; the nodes are in a different order. This is for the reader's convenience.
|
|
|
|
; CHECK: !named = !{!0}
|
|
!named = !{!0}
|
|
|
|
; CHECK: !0 = !{!1}
|
|
!0 = !{!1}
|
|
|
|
; CHECK: !1 = !{}
|
|
!1 = !{}
|
|
|
|
; CHECK-NOT: !2
|