blob: 1a9f1013e6ec0e83e92156175acc8baaa9d05f47 [file] [log] [blame]
# RUN: lld -core %s %p/Inputs/constants-coalesce.objtxt \
# RUN: %p/Inputs/constants-coalesce2.objtxt | FileCheck %s
#
# Test that duplicate merge-by-content anonymous constants are coalesced
# and non-mergable duplicate constants are not coalesced.
#
---
defined-atoms:
- ref-name: L4-byte
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
- ref-name: L8-byte
type: constant
merge: by-content
content: [ 01, 23, 45, 67, 89, AB, CD, EF ]
- ref-name: L1
type: constant
content: [ 01, 02 ]
...
# CHECK-NOT: name:
# CHECK: type: constant
# CHECK: content: [ 01, 02, 03, 04 ]
# CHECK: merge: by-content
# CHECK: type: constant
# CHECK: content: [ 01, 23, 45, 67, 89, AB, CD, EF ]
# CHECK: merge: by-content
# CHECK: type: constant
# CHECK: content: [ 01, 02 ]
# CHECK: type: constant
# CHECK: content: [ 01, 02 ]
# CHECK: type: constant
# CHECK: content: [ 01, 02, 03 ]
# CHECK: merge: by-content
# CHECK: ...