1 ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec < %s | \
4 ; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec < %s | \
7 ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
8 ; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s
9 ; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s
10 ; RUN: llvm-objdump -r -d --symbol-description %t.o | FileCheck --check-prefix=CHECKRELOC %s
12 ; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \
13 ; RUN: -mattr=-altivec -filetype=obj -o %t.o 2>&1 < %s | \
14 ; RUN: FileCheck --check-prefix=XCOFF64 %s
15 ; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
17 %struct.S = type { i32, i32 }
19 @s = external global %struct.S, align 4
23 %0 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @s, i32 0, i32 1), align 4
24 %1 = trunc i32 %0 to i8
25 %2 = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @s, i32 0, i32 1), align 4
26 call void @llvm.memset.p0i8.i32(i8* align 4 bitcast (%struct.S* @s to i8*), i8 %1, i32 %2, i1 false)
30 declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg)
33 ; CHECK-NEXT: # %bb.0: # %entry
38 ; CHECK: .extern .memset
41 ; CHECKSYM-NEXT: Index: 0
42 ; CHECKSYM-NEXT: Name: .file
43 ; CHECKSYM-NEXT: Value (SymbolTableIndex): 0x0
44 ; CHECKSYM-NEXT: Section: N_DEBUG
45 ; CHECKSYM-NEXT: Source Language ID: TB_C (0x0)
46 ; CHECKSYM-NEXT: CPU Version ID: 0x0
47 ; CHECKSYM-NEXT: StorageClass: C_FILE (0x67)
48 ; CHECKSYM-NEXT: NumberOfAuxEntries: 0
50 ; CHECKSYM-NEXT: Symbol {
51 ; CHECKSYM-NEXT: Index: 1
52 ; CHECKSYM-NEXT: Name: .memset
53 ; CHECKSYM-NEXT: Value (RelocatableAddress): 0x0
54 ; CHECKSYM-NEXT: Section: N_UNDEF
55 ; CHECKSYM-NEXT: Type: 0x0
56 ; CHECKSYM-NEXT: StorageClass: C_EXT (0x2)
57 ; CHECKSYM-NEXT: NumberOfAuxEntries: 1
58 ; CHECKSYM-NEXT: CSECT Auxiliary Entry {
59 ; CHECKSYM-NEXT: Index: 2
60 ; CHECKSYM-NEXT: SectionLen: 0
61 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0
62 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0
63 ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0
64 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0)
65 ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0)
66 ; CHECKSYM-NEXT: StabInfoIndex: 0x0
67 ; CHECKSYM-NEXT: StabSectNum: 0x0
71 ; CHECKRELOC: 00000000 (idx: 7) .bar:
72 ; CHECKRELOC-NEXT: 0: 7c 08 02 a6 mflr 0
73 ; CHECKRELOC-NEXT: 4: 90 01 00 08 stw 0, 8(1)
74 ; CHECKRELOC-NEXT: 8: 94 21 ff c0 stwu 1, -64(1)
75 ; CHECKRELOC-NEXT: c: 80 62 00 00 lwz 3, 0(2)
76 ; CHECKRELOC-NEXT: 0000000e: R_TOC (idx: 13) s[TC]
77 ; CHECKRELOC-NEXT: 10: 80 83 00 04 lwz 4, 4(3)
78 ; CHECKRELOC-NEXT: 14: 7c 85 23 78 mr 5, 4
79 ; CHECKRELOC-NEXT: 18: 4b ff ff e9 bl 0x0
80 ; CHECKRELOC-NEXT: 00000018: R_RBR (idx: 1) .memset[PR]