[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / MC / COFF / comm-align.s
blob441bf17769ea1d4738e0a0d142ba7bed10d1517d
1 # RUN: llvm-mc -triple i686-windows-gnu -filetype obj -o - %s \
2 # RUN: | llvm-readobj --coff-directives --symbols - | FileCheck %s
4 # NOTE: this test checks multiple things:
5 # - that -aligncomm is not emitted for 1-byte alignment
6 # - that -aligncomm is emitted for the various alignments (greater than 1)
7 # - that the alignment is represented as a log_2 of the alignment
8 # - that the section switching occurs correctly
9 # - that functions after the switch also are emitted into the correct section
11 .text
13 .def _a
14 .scl 3
15 .type 32
16 .endef
17 _a:
18 ret
20 .data
22 .comm _s_1,4,0 # @s_1
23 .comm _s_2,4,1 # @s_2
24 .comm _s_4,4,2 # @s_3
25 .comm _s_8,4,3 # @s_4
27 .comm _small_but_overaligned,1,3 # @s_4
29 .text
31 .def _b
32 .scl 3
33 .type 32
34 .endef
35 _b:
36 ret
38 # CHECK-NOT: -aligncomm:"_s_1",0
40 # CHECK: Symbols [
41 # CHECK: Symbol {
42 # CHECK: Name: _a
43 # CHECK: Section: .text (1)
44 # CHECK: }
45 # CHECK: Symbol {
46 # CHECK: Name: _small_but_overaligned
47 # CHECK-NEXT:Value: 1
48 # CHECK-NEXT:Section: IMAGE_SYM_UNDEFINED (0)
49 # CHECK: }
50 # CHECK: Symbol {
51 # CHECK: Name: _b
52 # CHECK: Section: .text (1)
53 # CHECK: }
54 # CHECK: ]
56 # CHECK: Directive(s): -aligncomm:"_s_2",1 -aligncomm:"_s_4",2 -aligncomm:"_s_8",3 -aligncomm:"_small_but_overaligned",3