source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/Generic/ForceStackAlign.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 645 bytes
Line 
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, i32 1, 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, i32, i1) nounwind
Note: See TracBrowser for help on using the repository browser.