brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.2 KiB · f149010 Raw
99 lines · plain
1; This file tests the codegen of mergeable const in AIX assembly.2; This file also tests mergeable const in XCOFF object file generation.3; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \4; RUN:     -global-merge-all-const=false -data-sections=false -xcoff-traceback-table=false < %s | \5; RUN:   FileCheck --check-prefixes=CHECK,CHECK32 %s6; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \7; RUN:     -global-merge-all-const=false -xcoff-traceback-table=false -data-sections=false < %s | \8; RUN:   FileCheck --check-prefixes=CHECK,CHECK64 %s9; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \10; RUN:     -global-merge-all-const=false -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s11; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s12; RUN: llvm-readobj -s %t.o | FileCheck --check-prefix=CHECKSYM %s13 14%struct.Merge_cnst32 = type { i64, i32, i64, i32 }15%struct.Merge_cnst16 = type { i64, i32 }16%struct.Merge_cnst8 = type { i32, i32 }17%struct.Merge_cnst4 = type { i16, i8 }18 19@__const.main.cnst32 = private unnamed_addr constant %struct.Merge_cnst32 { i64 4611686018427387954, i32 0, i64 0, i32 0 }20@__const.main.cnst16 = private unnamed_addr constant %struct.Merge_cnst16 { i64 4611686018427387926, i32 0 }21@__const.main.cnst8 = private unnamed_addr constant %struct.Merge_cnst8 { i32 1073741832, i32 0 }22@__const.main.cnst4 = private unnamed_addr constant %struct.Merge_cnst4 { i16 16392, i8 0 }23 24; Function Attrs: noinline nounwind optnone25define i32 @main() #0 {26entry:27  ret i32 028}29 30;CHECK:         .csect .rodata[RO],431 32;CHECK-NEXT:         .align  433;CHECK-NEXT: L..__const.main.cnst32:34;CHECK32-NEXT:         .vbyte	4, 107374182435;CHECK32-NEXT:         .vbyte	4, 5036;CHECK64-NEXT:         .vbyte	8, 461168601842738795437;CHECK-NEXT:           .vbyte	4, 0                       # 0x038;CHECK-NEXT:           .space  439;CHECK32-NEXT:         .vbyte	4, 040;CHECK32-NEXT:         .vbyte	4, 041;CHECK64-NEXT:         .vbyte	8, 042;CHECK-NEXT:           .vbyte	4, 0                       # 0x043;CHECK-NEXT:           .space  444 45;CHECK-NEXT:           .align  346;CHECK-NEXT: L..__const.main.cnst16:47;CHECK32-NEXT:         .vbyte	4, 107374182448;CHECK32-NEXT:         .vbyte	4, 2249;CHECK64-NEXT:         .vbyte	8, 461168601842738792650;CHECK-NEXT:           .vbyte	4, 0                       # 0x051;CHECK-NEXT:           .space  452 53;CHECK-NEXT:         .align  354;CHECK-NEXT: L..__const.main.cnst8:55;CHECK-NEXT:         .vbyte	4, 1073741832              # 0x4000000856;CHECK-NEXT:         .vbyte	4, 0                       # 0x057 58;CHECK-NEXT:         .align  359;CHECK-NEXT: L..__const.main.cnst4:60;CHECK-NEXT:         .vbyte	2, 16392                   # 0x400861;CHECK-NEXT:         .byte   0                       # 0x062;CHECK-NEXT:         .space  163 64 65;CHECKOBJ:      00000000 <.main>:66;CHECKOBJ-NEXT:        0: 38 60 00 00                    li 3, 067;CHECKOBJ-NEXT:        4: 4e 80 00 20                    blr68;CHECKOBJ-NEXT:          ...{{[[:space:]] *}}69;CHECKOBJ-NEXT: 00000010 <.rodata>:70;CHECKOBJ-NEXT:        10: 40 00 00 0071;CHECKOBJ-NEXT:        14: 00 00 00 3272;CHECKOBJ-NEXT:          ...{{[[:space:]] *}}73;CHECKOBJ-SAME:       30: 40 00 00 0074;CHECKOBJ-NEXT:       34: 00 00 00 1675;CHECKOBJ-NEXT:          ...{{[[:space:]] *}}76;CHECKOBJ-SAME:       40: 40 00 00 0877;CHECKOBJ-NEXT:       44: 00 00 00 0078;CHECKOBJ-NEXT:       48: 40 08 00 0079 80 81;CHECKSYM:        Symbol {{[{][[:space:]] *}}Index: [[#Index:]]{{[[:space:]] *}}Name: .rodata82;CHECKSYM-NEXT:     Value (RelocatableAddress): 0x1083;CHECKSYM-NEXT:     Section: .text84;CHECKSYM-NEXT:     Type: 0x085;CHECKSYM-NEXT:     StorageClass: C_HIDEXT (0x6B)86;CHECKSYM-NEXT:     NumberOfAuxEntries: 187;CHECKSYM-NEXT:     CSECT Auxiliary Entry {88;CHECKSYM-NEXT:       Index: [[#Index+1]]89;CHECKSYM-NEXT:       SectionLen: 6090;CHECKSYM-NEXT:       ParameterHashIndex: 0x091;CHECKSYM-NEXT:       TypeChkSectNum: 0x092;CHECKSYM-NEXT:       SymbolAlignmentLog2: 493;CHECKSYM-NEXT:       SymbolType: XTY_SD (0x1)94;CHECKSYM-NEXT:       StorageMappingClass: XMC_RO (0x1)95;CHECKSYM-NEXT:       StabInfoIndex: 0x096;CHECKSYM-NEXT:       StabSectNum: 0x097;CHECKSYM-NEXT:     }98;CHECKSYM-NEXT:   }99