Files
clang-p2996/llvm/test/CodeGen/NVPTX/dynamic_stackalloc.ll
Youngsuk Kim f9304974cc [llvm][NVPTX] Inform that 'DYNAMIC_STACKALLOC' is unsupported (#74684)
Catch unsupported path early up, and emit error with information.

Motivated by the following threads:
* https://discourse.llvm.org/t/nvptx-problems-with-dynamic-alloca/70745
* #64017
2023-12-14 22:06:22 -05:00

11 lines
333 B
LLVM

; RUN: not llc -march=nvptx < %s 2>&1 | FileCheck %s
; RUN: not llc -march=nvptx64 < %s 2>&1 | FileCheck %s
; CHECK: in function test_dynamic_stackalloc{{.*}}: dynamic alloca unsupported by NVPTX backend
define void @test_dynamic_stackalloc(i64 %n) {
%alloca = alloca i32, i64 %n
store volatile i32 0, ptr %alloca
ret void
}