1 ; This file tests the codegen of mergeable strings in AIX assembly only.
2 ; Once the codegen of mergeable strings for XCOFF object files is supported
3 ; the test in this file should be merged into aix-xcoff-data.ll with additional
4 ; tests for XCOFF object files.
6 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \
7 ; RUN: -mtriple powerpc-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | FileCheck %s
8 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \
9 ; RUN: -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | FileCheck %s
11 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
12 ; RUN: -xcoff-traceback-table=false -data-sections=false -ppc-merge-string-pool=false -filetype=obj -o %t.o < %s
13 ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s
15 @magic16 = private unnamed_addr constant [4 x i16] [i16 264, i16 272, i16 213, i16 0], align 2
16 @magic32 = private unnamed_addr constant [4 x i32] [i32 464, i32 472, i32 413, i32 0], align 4
17 @strA = private unnamed_addr constant [14 x i8] c"hello world!\0A\00", align 1
18 @.str = private unnamed_addr constant [9 x i8] c"abcdefgh\00", align 1
19 @p = global ptr @.str, align 4
21 ; Function Attrs: noinline nounwind optnone
24 %0 = load ptr, ptr @p, align 4
25 %1 = load i8, ptr %0, align 1
29 ; CHECK: .csect .rodata[RO],2
30 ; CHECK-NEXT: .align 1
31 ; CHECK-NEXT: L..magic16:
32 ; CHECK-NEXT: .vbyte 2, 264 # 0x108
33 ; CHECK-NEXT: .vbyte 2, 272 # 0x110
34 ; CHECK-NEXT: .vbyte 2, 213 # 0xd5
35 ; CHECK-NEXT: .vbyte 2, 0 # 0x0
36 ; CHECK-NEXT: .align 2
37 ; CHECK-NEXT: L..magic32:
38 ; CHECK-NEXT: .vbyte 4, 464 # 0x1d0
39 ; CHECK-NEXT: .vbyte 4, 472 # 0x1d8
40 ; CHECK-NEXT: .vbyte 4, 413 # 0x19d
41 ; CHECK-NEXT: .vbyte 4, 0 # 0x0
42 ; CHECK-NEXT: L..strA:
43 ; CHECK-NEXT: .byte 'h,'e,'l,'l,'o,' ,'w,'o,'r,'l,'d,'!,0012,0000
44 ; CHECK-NEXT: L...str:
45 ; CHECK-NEXT: .string "abcdefgh"
47 ; CHECKOBJ: 00000010 <.rodata>:
48 ; CHECKOBJ-NEXT: 10: 01 08 01 10
49 ; CHECKOBJ-NEXT: 14: 00 d5 00 00
50 ; CHECKOBJ-NEXT: 18: 00 00 01 d0
51 ; CHECKOBJ-NEXT: 1c: 00 00 01 d8
52 ; CHECKOBJ-NEXT: 20: 00 00 01 9d
53 ; CHECKOBJ-NEXT: 24: 00 00 00 00
54 ; CHECKOBJ-NEXT: 28: 68 65 6c 6c
55 ; CHECKOBJ-NEXT: 2c: 6f 20 77 6f
56 ; CHECKOBJ-NEXT: 30: 72 6c 64 21
57 ; CHECKOBJ-NEXT: 34: 0a 00 61 62
58 ; CHECKOBJ-NEXT: 38: 63 64 65 66
59 ; CHECKOBJ-NEXT: 3c: 67 68 00 00