mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 01:34:32 +00:00
8b2b8a1835
This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186280 91177308-0d34-0410-b5e6-96231b3b80d8
92 lines
2.8 KiB
LLVM
92 lines
2.8 KiB
LLVM
; Test spilling of GPRs.
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
|
|
|
|
; We need to allocate a 4-byte spill slot, rounded to 8 bytes. The frame
|
|
; size should be exactly 160 + 8 = 168.
|
|
define void @f1(i32 *%ptr) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: stmg %r6, %r15, 48(%r15)
|
|
; CHECK: aghi %r15, -168
|
|
; CHECK-NOT: 160(%r15)
|
|
; CHECK: st [[REGISTER:%r[0-9]+]], 164(%r15)
|
|
; CHECK-NOT: 160(%r15)
|
|
; CHECK: l [[REGISTER]], 164(%r15)
|
|
; CHECK-NOT: 160(%r15)
|
|
; CHECK: lmg %r6, %r15, 216(%r15)
|
|
; CHECK: br %r14
|
|
%l0 = load volatile i32 *%ptr
|
|
%l1 = load volatile i32 *%ptr
|
|
%l3 = load volatile i32 *%ptr
|
|
%l4 = load volatile i32 *%ptr
|
|
%l5 = load volatile i32 *%ptr
|
|
%l6 = load volatile i32 *%ptr
|
|
%l7 = load volatile i32 *%ptr
|
|
%l8 = load volatile i32 *%ptr
|
|
%l9 = load volatile i32 *%ptr
|
|
%l10 = load volatile i32 *%ptr
|
|
%l11 = load volatile i32 *%ptr
|
|
%l12 = load volatile i32 *%ptr
|
|
%l13 = load volatile i32 *%ptr
|
|
%l14 = load volatile i32 *%ptr
|
|
%lx = load volatile i32 *%ptr
|
|
store volatile i32 %lx, i32 *%ptr
|
|
store volatile i32 %l14, i32 *%ptr
|
|
store volatile i32 %l13, i32 *%ptr
|
|
store volatile i32 %l12, i32 *%ptr
|
|
store volatile i32 %l11, i32 *%ptr
|
|
store volatile i32 %l10, i32 *%ptr
|
|
store volatile i32 %l9, i32 *%ptr
|
|
store volatile i32 %l8, i32 *%ptr
|
|
store volatile i32 %l7, i32 *%ptr
|
|
store volatile i32 %l6, i32 *%ptr
|
|
store volatile i32 %l5, i32 *%ptr
|
|
store volatile i32 %l4, i32 *%ptr
|
|
store volatile i32 %l3, i32 *%ptr
|
|
store volatile i32 %l1, i32 *%ptr
|
|
store volatile i32 %l0, i32 *%ptr
|
|
ret void
|
|
}
|
|
|
|
; Same for i64, except that the full spill slot is used.
|
|
define void @f2(i64 *%ptr) {
|
|
; CHECK-LABEL: f2:
|
|
; CHECK: stmg %r6, %r15, 48(%r15)
|
|
; CHECK: aghi %r15, -168
|
|
; CHECK: stg [[REGISTER:%r[0-9]+]], 160(%r15)
|
|
; CHECK: lg [[REGISTER]], 160(%r15)
|
|
; CHECK: lmg %r6, %r15, 216(%r15)
|
|
; CHECK: br %r14
|
|
%l0 = load volatile i64 *%ptr
|
|
%l1 = load volatile i64 *%ptr
|
|
%l3 = load volatile i64 *%ptr
|
|
%l4 = load volatile i64 *%ptr
|
|
%l5 = load volatile i64 *%ptr
|
|
%l6 = load volatile i64 *%ptr
|
|
%l7 = load volatile i64 *%ptr
|
|
%l8 = load volatile i64 *%ptr
|
|
%l9 = load volatile i64 *%ptr
|
|
%l10 = load volatile i64 *%ptr
|
|
%l11 = load volatile i64 *%ptr
|
|
%l12 = load volatile i64 *%ptr
|
|
%l13 = load volatile i64 *%ptr
|
|
%l14 = load volatile i64 *%ptr
|
|
%lx = load volatile i64 *%ptr
|
|
store volatile i64 %lx, i64 *%ptr
|
|
store volatile i64 %l14, i64 *%ptr
|
|
store volatile i64 %l13, i64 *%ptr
|
|
store volatile i64 %l12, i64 *%ptr
|
|
store volatile i64 %l11, i64 *%ptr
|
|
store volatile i64 %l10, i64 *%ptr
|
|
store volatile i64 %l9, i64 *%ptr
|
|
store volatile i64 %l8, i64 *%ptr
|
|
store volatile i64 %l7, i64 *%ptr
|
|
store volatile i64 %l6, i64 *%ptr
|
|
store volatile i64 %l5, i64 *%ptr
|
|
store volatile i64 %l4, i64 *%ptr
|
|
store volatile i64 %l3, i64 *%ptr
|
|
store volatile i64 %l1, i64 *%ptr
|
|
store volatile i64 %l0, i64 *%ptr
|
|
ret void
|
|
}
|