• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Check that stack alignment can be forced. Individual targets should test their
2; specific implementation details.
3
4; RUN: llc < %s -stackrealign -stack-alignment=32 | FileCheck %s
5; CHECK-LABEL: @f
6; CHECK-LABEL: @g
7
8define i32 @f(i8* %p) nounwind {
9entry:
10  %0 = load i8, i8* %p
11  %conv = sext i8 %0 to i32
12  ret i32 %conv
13}
14
15define i64 @g(i32 %i) nounwind {
16entry:
17  br label %if.then
18
19if.then:
20  %0 = alloca i8, i32 %i
21  call void @llvm.memset.p0i8.i32(i8* %0, i8 0, i32 %i, i1 false)
22  %call = call i32 @f(i8* %0)
23  %conv = sext i32 %call to i64
24  ret i64 %conv
25}
26
27declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i1) nounwind
28