1; This test tries to verify if a csect containing code would have the correct alignment.
2
3; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
4; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s
5
6; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s
7; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s
8
9; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \
10; RUN:   FileCheck --check-prefix=XCOFF64 %s
11; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
12
13define i32 @foo()  align 32 {
14entry:
15  ret i32 0
16}
17
18define i32 @bar()  align 64 {
19entry:
20  ret i32 0
21}
22
23; CHECK:      .csect .text[PR],6
24; CHECK-NEXT: .foo:
25
26; CHECK:      .csect .text[PR],6
27; CHECK-NEXT: .bar:
28
29; SYMS:       Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .text
30; SYMS-NEXT:    Value (RelocatableAddress): 0x0
31; SYMS-NEXT:    Section: .text
32; SYMS-NEXT:    Type: 0x0
33; SYMS-NEXT:    StorageClass: C_HIDEXT (0x6B)
34; SYMS-NEXT:    NumberOfAuxEntries: 1
35; SYMS-NEXT:    CSECT Auxiliary Entry {
36; SYMS-NEXT:      Index: [[#INDX+1]]
37; SYMS-NEXT:      SectionLen: 72
38; SYMS-NEXT:      ParameterHashIndex: 0x0
39; SYMS-NEXT:      TypeChkSectNum: 0x0
40; SYMS-NEXT:      SymbolAlignmentLog2: 6
41; SYMS-NEXT:      SymbolType: XTY_SD (0x1)
42; SYMS-NEXT:      StorageMappingClass: XMC_PR (0x0)
43; SYMS-NEXT:      StabInfoIndex: 0x0
44; SYMS-NEXT:      StabSectNum: 0x0
45; SYMS-NEXT:    }
46; SYMS-NEXT:  }
47