1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/VE/alloca_aligned.ll
Kazushi (Jam) Marukawa 3aa0420e20 [VE] Dynamic stack allocation
Summary:
This patch implements dynamic stack allocation for the VE target. Changes:
* compiler-rt: `__ve_grow_stack` to request stack allocation on the VE.
* VE: base pointer support, dynamic stack allocation.

Differential Revision: https://reviews.llvm.org/D79084
2020-05-27 10:11:06 +02:00

30 lines
935 B
LLVM

; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
declare void @bar(i8*, i64)
; Function Attrs: nounwind
define void @test(i64 %n) {
; CHECK-LABEL: test:
; CHECK: .LBB{{[0-9]+}}_2:
; CHECK-NEXT: or %s2, 0, %s0
; CHECK-NEXT: lea %s0, 15(, %s0)
; CHECK-NEXT: and %s0, -16, %s0
; CHECK-NEXT: lea %s1, __ve_grow_stack_align@lo
; CHECK-NEXT: and %s1, %s1, (32)0
; CHECK-NEXT: lea.sl %s12, __ve_grow_stack_align@hi(, %s1)
; CHECK-NEXT: or %s1, -32, (0)1
; CHECK-NEXT: bsic %s10, (, %s12)
; CHECK-NEXT: lea %s0, 240(, %s11)
; CHECK-NEXT: lea %s0, 31(, %s0)
; CHECK-NEXT: and %s0, -32, %s0
; CHECK-NEXT: lea %s1, bar@lo
; CHECK-NEXT: and %s1, %s1, (32)0
; CHECK-NEXT: lea.sl %s12, bar@hi(, %s1)
; CHECK-NEXT: or %s1, 0, %s2
; CHECK-NEXT: bsic %s10, (, %s12)
; CHECK-NEXT: or %s11, 0, %s9
%dyna = alloca i8, i64 %n, align 32
call void @bar(i8* %dyna, i64 %n)
ret void
}