brintos

brintos / llvm-project-archived public Read only

0
0
Text · 490 B · a2c1ba4 Raw
18 lines · plain
1; RUN: llc < %s2 3; NVPTX can not select llvm.stacksave (dynamic_stackalloc) and llvm.stackrestore4; UNSUPPORTED: target=nvptx{{.*}}5 6declare ptr @llvm.stacksave()7 8declare void @llvm.stackrestore(ptr)9 10define ptr @test(i32 %N) {11        %tmp = call ptr @llvm.stacksave( )              ; <ptr> [#uses=1]12        %P = alloca i32, i32 %N         ; <ptr> [#uses=1]13        call void @llvm.stackrestore( ptr %tmp )14        %Q = alloca i32, i32 %N         ; <ptr> [#uses=0]15        ret ptr %P16}17 18