blob: 7eed8321308cee477b68beaffee4cdc0a84ad94b [file] [log] [blame]
JF Bastiene4d22d52015-07-20 22:51:32 +00001; Check that stack alignment can be forced. Individual targets should test their
2; specific implementation details.
3
Akira Hatanakabc497c92015-09-11 18:54:38 +00004; RUN: llc < %s -stackrealign -stack-alignment=32 | FileCheck %s
JF Bastiene4d22d52015-07-20 22:51:32 +00005; 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
Daniel Neilson1e687242018-01-19 17:13:12 +000021 call void @llvm.memset.p0i8.i32(i8* %0, i8 0, i32 %i, i1 false)
JF Bastiene4d22d52015-07-20 22:51:32 +000022 %call = call i32 @f(i8* %0)
23 %conv = sext i32 %call to i64
24 ret i64 %conv
25}
26
Daniel Neilson1e687242018-01-19 17:13:12 +000027declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i1) nounwind