2013-04-05 02:59:24 +08:00
|
|
|
# RUN: lld -core %s | FileCheck %s
|
2013-01-15 08:17:57 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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 ]
|
|
|
|
---
|
|
|
|
defined-atoms:
|
|
|
|
- ref-name: L1
|
|
|
|
type: constant
|
|
|
|
content: [ 01, 02 ]
|
|
|
|
- ref-name: L2
|
|
|
|
type: constant
|
|
|
|
merge: by-content
|
|
|
|
content: [ 01, 02, 03, 04 ]
|
|
|
|
---
|
|
|
|
defined-atoms:
|
|
|
|
- ref-name: L2
|
|
|
|
type: constant
|
|
|
|
merge: by-content
|
|
|
|
content: [ 01, 23, 45, 67, 89, AB, CD, EF ]
|
|
|
|
- ref-name: L3
|
|
|
|
type: constant
|
|
|
|
merge: by-content
|
|
|
|
content: [ 01, 02, 03 ]
|
|
|
|
...
|
|
|
|
|
|
|
|
# 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: ...
|
|
|
|
|
|
|
|
|