xref: /llvm-project/llvm/test/CodeGen/Mips/stack-alignment.ll (revision ae26f50aea4ef1a6c7058019f0db11a91bbcdade)
1; RUN: split-file %s %t
2; RUN: cat %t/main.ll %t/_32.ll > %t/32.ll
3; RUN: llc -mtriple=mipsel < %t/main.ll | FileCheck %s -check-prefix=32
4; RUN: llc -mtriple=mipsel < %t/32.ll | FileCheck %s -check-prefix=A32-32
5; RUN: llc -mtriple=mipsel -mattr=+fp64,+mips32r2 < %t/main.ll | FileCheck %s -check-prefix=32
6; RUN: llc -mtriple=mips64el -mcpu=mips3 < %t/main.ll | FileCheck %s -check-prefix=64
7; RUN: llc -mtriple=mips64el -mcpu=mips4 < %t/main.ll | FileCheck %s -check-prefix=64
8; RUN: llc -mtriple=mips64el -mcpu=mips64 < %t/main.ll | FileCheck %s -check-prefix=64
9; RUN: llc -mtriple=mips64el -mcpu=mips64 < %t/32.ll | FileCheck %s -check-prefix=A32-64
10
11;--- main.ll
12; 32:      addiu  $sp, $sp, -8
13; 64:      daddiu  $sp, $sp, -16
14; A32-32:  addiu  $sp, $sp, -32
15; A32-64:  daddiu  $sp, $sp, -32
16
17define i32 @foo1() #0 {
18entry:
19  ret i32 14
20}
21
22attributes #0 = { "frame-pointer"="all" }
23;--- _32.ll
24!llvm.module.flags = !{!0}
25!0 = !{i32 1, !"override-stack-alignment", i32 32}
26