forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PowerPC][NFC] Pre-commit test case to prepare for patch to merge int…
…ernal and private global data
- Loading branch information
Showing
1 changed file
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 \ | ||
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \ | ||
; RUN: --check-prefix=AIX64 | ||
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \ | ||
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \ | ||
; RUN: --check-prefix=AIX32 | ||
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \ | ||
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \ | ||
; RUN: --check-prefix=LINUX64LE | ||
; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \ | ||
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \ | ||
; RUN: --check-prefix=LINUX64BE | ||
|
||
@.str = private unnamed_addr constant [15 x i8] c"Private global\00", align 1 | ||
@str = internal constant [16 x i8] c"Internal global\00", align 1 | ||
|
||
declare noundef signext i32 @puts(ptr nocapture noundef readonly) | ||
|
||
define dso_local void @print_func() { | ||
; AIX64-LABEL: print_func: | ||
; AIX64: # %bb.0: # %entry | ||
; AIX64-NEXT: mflr r0 | ||
; AIX64-NEXT: stdu r1, -128(r1) | ||
; AIX64-NEXT: std r0, 144(r1) | ||
; AIX64-NEXT: std r31, 120(r1) # 8-byte Folded Spill | ||
; AIX64-NEXT: ld r31, L..C0(r2) # @__ModuleStringPool | ||
; AIX64-NEXT: mr r3, r31 | ||
; AIX64-NEXT: bl .puts[PR] | ||
; AIX64-NEXT: nop | ||
; AIX64-NEXT: addi r3, r31, 15 | ||
; AIX64-NEXT: bl .puts[PR] | ||
; AIX64-NEXT: nop | ||
; AIX64-NEXT: ld r31, 120(r1) # 8-byte Folded Reload | ||
; AIX64-NEXT: addi r1, r1, 128 | ||
; AIX64-NEXT: ld r0, 16(r1) | ||
; AIX64-NEXT: mtlr r0 | ||
; AIX64-NEXT: blr | ||
; | ||
; AIX32-LABEL: print_func: | ||
; AIX32: # %bb.0: # %entry | ||
; AIX32-NEXT: mflr r0 | ||
; AIX32-NEXT: stwu r1, -64(r1) | ||
; AIX32-NEXT: stw r0, 72(r1) | ||
; AIX32-NEXT: stw r31, 60(r1) # 4-byte Folded Spill | ||
; AIX32-NEXT: lwz r31, L..C0(r2) # @__ModuleStringPool | ||
; AIX32-NEXT: mr r3, r31 | ||
; AIX32-NEXT: bl .puts[PR] | ||
; AIX32-NEXT: nop | ||
; AIX32-NEXT: addi r3, r31, 15 | ||
; AIX32-NEXT: bl .puts[PR] | ||
; AIX32-NEXT: nop | ||
; AIX32-NEXT: lwz r31, 60(r1) # 4-byte Folded Reload | ||
; AIX32-NEXT: addi r1, r1, 64 | ||
; AIX32-NEXT: lwz r0, 8(r1) | ||
; AIX32-NEXT: mtlr r0 | ||
; AIX32-NEXT: blr | ||
; | ||
; LINUX64LE-LABEL: print_func: | ||
; LINUX64LE: # %bb.0: # %entry | ||
; LINUX64LE-NEXT: mflr r0 | ||
; LINUX64LE-NEXT: .cfi_def_cfa_offset 48 | ||
; LINUX64LE-NEXT: .cfi_offset lr, 16 | ||
; LINUX64LE-NEXT: .cfi_offset r30, -16 | ||
; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill | ||
; LINUX64LE-NEXT: stdu r1, -48(r1) | ||
; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha | ||
; LINUX64LE-NEXT: std r0, 64(r1) | ||
; LINUX64LE-NEXT: addi r30, r3, .L__ModuleStringPool@toc@l | ||
; LINUX64LE-NEXT: mr r3, r30 | ||
; LINUX64LE-NEXT: bl puts | ||
; LINUX64LE-NEXT: nop | ||
; LINUX64LE-NEXT: addi r3, r30, 15 | ||
; LINUX64LE-NEXT: bl puts | ||
; LINUX64LE-NEXT: nop | ||
; LINUX64LE-NEXT: addi r1, r1, 48 | ||
; LINUX64LE-NEXT: ld r0, 16(r1) | ||
; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload | ||
; LINUX64LE-NEXT: mtlr r0 | ||
; LINUX64LE-NEXT: blr | ||
; | ||
; LINUX64BE-LABEL: print_func: | ||
; LINUX64BE: # %bb.0: # %entry | ||
; LINUX64BE-NEXT: mflr r0 | ||
; LINUX64BE-NEXT: stdu r1, -128(r1) | ||
; LINUX64BE-NEXT: std r0, 144(r1) | ||
; LINUX64BE-NEXT: .cfi_def_cfa_offset 128 | ||
; LINUX64BE-NEXT: .cfi_offset lr, 16 | ||
; LINUX64BE-NEXT: .cfi_offset r30, -16 | ||
; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha | ||
; LINUX64BE-NEXT: std r30, 112(r1) # 8-byte Folded Spill | ||
; LINUX64BE-NEXT: addi r30, r3, .L__ModuleStringPool@toc@l | ||
; LINUX64BE-NEXT: mr r3, r30 | ||
; LINUX64BE-NEXT: bl puts | ||
; LINUX64BE-NEXT: nop | ||
; LINUX64BE-NEXT: addi r3, r30, 15 | ||
; LINUX64BE-NEXT: bl puts | ||
; LINUX64BE-NEXT: nop | ||
; LINUX64BE-NEXT: ld r30, 112(r1) # 8-byte Folded Reload | ||
; LINUX64BE-NEXT: addi r1, r1, 128 | ||
; LINUX64BE-NEXT: ld r0, 16(r1) | ||
; LINUX64BE-NEXT: mtlr r0 | ||
; LINUX64BE-NEXT: blr | ||
entry: | ||
%call = tail call signext i32 @puts(ptr noundef nonnull dereferenceable(1) @.str) | ||
%call1 = tail call signext i32 @puts(ptr noundef nonnull dereferenceable(1) @str) | ||
ret void | ||
} |