brintos

brintos / llvm-project-archived public Read only

0
0
Text · 786 B · 811a192 Raw
34 lines · plain
1; Check that stack alignment can be forced. Individual targets should test their2; specific implementation details.3 4; RUN: llc < %s -stackrealign | FileCheck %s5; CHECK-LABEL: @f6; CHECK-LABEL: @g7 8; NVPTX can only select dynamic_stackalloc on sm_52+ and with ptx73+9; XFAIL: target=nvptx{{.*}}10 11define i32 @f(ptr %p) nounwind {12entry:13  %0 = load i8, ptr %p14  %conv = sext i8 %0 to i3215  ret i32 %conv16}17 18define i64 @g(i32 %i) nounwind {19entry:20  br label %if.then21 22if.then:23  %0 = alloca i8, i32 %i24  call void @llvm.memset.p0.i32(ptr %0, i8 0, i32 %i, i1 false)25  %call = call i32 @f(ptr %0)26  %conv = sext i32 %call to i6427  ret i64 %conv28}29 30declare void @llvm.memset.p0.i32(ptr, i8, i32, i1) nounwind31 32!llvm.module.flags = !{!0}33!0 = !{i32 2, !"override-stack-alignment", i32 32}34