]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/core/constants-coalesce.objtxt
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / core / constants-coalesce.objtxt
1 # RUN: lld -core %s | FileCheck %s
2
3 #
4 # Test that duplicate merge-by-content anonymous constants are coalesced
5 # and non-mergable duplicate constants are not coalesced.
6 #
7
8 ---
9 defined-atoms:
10     - ref-name:          L4-byte
11       type:              constant
12       merge:             by-content
13       content:           [ 01, 02, 03, 04 ]
14
15     - ref-name:          L8-byte
16       type:              constant
17       merge:             by-content
18       content:           [ 01, 23, 45, 67, 89, AB, CD, EF ]
19
20     - ref-name:          L1
21       type:              constant
22       content:           [ 01, 02 ]
23 ---
24 defined-atoms:
25     - ref-name:          L1
26       type:              constant
27       content:           [ 01, 02 ]
28     - ref-name:          L2
29       type:              constant
30       merge:             by-content
31       content:           [ 01, 02, 03, 04 ]
32 ---
33 defined-atoms:
34     - ref-name:          L2
35       type:              constant
36       merge:             by-content
37       content:           [ 01, 23, 45, 67, 89, AB, CD, EF ]
38     - ref-name:          L3
39       type:              constant
40       merge:             by-content
41       content:           [ 01, 02, 03 ]
42 ...
43
44 # CHECK-NOT:   name:
45 # CHECK:       type:       constant
46 # CHECK:       content:    [ 01, 02, 03, 04 ]
47 # CHECK:       merge:      by-content
48 # CHECK:       type:       constant
49 # CHECK:       content:    [ 01, 23, 45, 67, 89, AB, CD, EF ]
50 # CHECK:       merge:      by-content
51 # CHECK:       type:       constant
52 # CHECK:       content:    [ 01, 02 ]
53 # CHECK:       type:       constant
54 # CHECK:       content:    [ 01, 02 ]
55 # CHECK:       type:       constant
56 # CHECK:       content:    [ 01, 02, 03 ]
57 # CHECK:       merge:      by-content
58 # CHECK:       ...
59
60