40 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=sparc < %s | FileCheck %s --check-prefixes=CHECK323; RUN: llc -mtriple=sparcv9 < %s | FileCheck %s --check-prefixes=CHECK644declare void @stack_realign_helper(i32 %a, ptr %b)5 6;; This is a function where we have a local variable of 64-byte7;; alignment. We want to see that the stack is aligned (the initial add/and),8;; that the local var is accessed via stack pointer (to %o1), and that9;; the argument is accessed via frame pointer not stack pointer (to %o0).10 11define void @stack_realign(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g) nounwind {12; CHECK32-LABEL: stack_realign:13; CHECK32: ! %bb.0: ! %entry14; CHECK32-NEXT: save %sp, -96, %sp15; CHECK32-NEXT: ld [%fp+92], %o016; CHECK32-NEXT: add %sp, 80, %i017; CHECK32-NEXT: and %i0, -64, %o118; CHECK32-NEXT: call stack_realign_helper19; CHECK32-NEXT: add %o1, -96, %sp20; CHECK32-NEXT: ret21; CHECK32-NEXT: restore22;23; CHECK64-LABEL: stack_realign:24; CHECK64: ! %bb.0: ! %entry25; CHECK64-NEXT: save %sp, -128, %sp26; CHECK64-NEXT: add %sp, 2159, %i027; CHECK64-NEXT: and %i0, -64, %o128; CHECK64-NEXT: add %o1, -2175, %sp29; CHECK64-NEXT: add %sp, -48, %sp30; CHECK64-NEXT: call stack_realign_helper31; CHECK64-NEXT: ld [%fp+2227], %o032; CHECK64-NEXT: add %sp, 48, %sp33; CHECK64-NEXT: ret34; CHECK64-NEXT: restore35entry:36 %aligned = alloca i32, align 6437 call void @stack_realign_helper(i32 %g, ptr %aligned)38 ret void39}40