brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · edc74e3 Raw
63 lines · plain
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 supported3; the test in this file should be merged into aix-xcoff-data.ll with additional4; tests for XCOFF object files.5 6; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \7; RUN:     -mtriple powerpc-ibm-aix-xcoff  -data-sections=false \8; RUN:     -global-merge-all-const=false < %s | FileCheck %s9; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \10; RUN:     -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \11; RUN:     -global-merge-all-const=false < %s | FileCheck %s12 13; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \14; RUN:     -xcoff-traceback-table=false -data-sections=false \15; RUN:     -global-merge-all-const=false -filetype=obj -o %t.o < %s16; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s17 18@magic16 = private unnamed_addr constant [4 x i16] [i16 264, i16 272, i16 213, i16 0], align 219@magic32 =  private unnamed_addr constant [4 x i32] [i32 464, i32 472, i32 413, i32 0], align 420@strA = private unnamed_addr constant [14 x i8] c"hello world!\0A\00", align 121@.str = private unnamed_addr constant [9 x i8] c"abcdefgh\00", align 122@p = global ptr @.str, align 423 24; Function Attrs: noinline nounwind optnone25define i8 @foo() #0 {26entry:27  %0 = load ptr, ptr @p, align 428  %1 = load i8, ptr %0, align 129  ret i8 %130}31 32; CHECK:   .csect .rodata[RO],233; CHECK-NEXT:   .align  134; CHECK-NEXT: L..magic16:35; CHECK-NEXT:   .vbyte	2, 264                     # 0x10836; CHECK-NEXT:   .vbyte	2, 272                     # 0x11037; CHECK-NEXT:   .vbyte	2, 213                     # 0xd538; CHECK-NEXT:   .vbyte	2, 0                       # 0x039; CHECK-NEXT:   .align  240; CHECK-NEXT: L..magic32:41; CHECK-NEXT:   .vbyte	4, 464                     # 0x1d042; CHECK-NEXT:   .vbyte	4, 472                     # 0x1d843; CHECK-NEXT:   .vbyte	4, 413                     # 0x19d44; CHECK-NEXT:   .vbyte	4, 0                       # 0x045; CHECK-NEXT: L..strA:46; CHECK-NEXT: .byte   'h,'e,'l,'l,'o,' ,'w,'o,'r,'l,'d,'!,0012,000047; CHECK-NEXT: L...str:48; CHECK-NEXT: .string "abcdefgh"49 50; CHECKOBJ:     00000010 <.rodata>:51; CHECKOBJ-NEXT:       10: 01 08 01 1052; CHECKOBJ-NEXT:       14: 00 d5 00 0053; CHECKOBJ-NEXT:       18: 00 00 01 d054; CHECKOBJ-NEXT:       1c: 00 00 01 d855; CHECKOBJ-NEXT:       20: 00 00 01 9d56; CHECKOBJ-NEXT:       24: 00 00 00 0057; CHECKOBJ-NEXT:       28: 68 65 6c 6c58; CHECKOBJ-NEXT:       2c: 6f 20 77 6f59; CHECKOBJ-NEXT:       30: 72 6c 64 2160; CHECKOBJ-NEXT:       34: 0a 00 61 6261; CHECKOBJ-NEXT:       38: 63 64 65 6662; CHECKOBJ-NEXT:       3c: 67 68 00 0063