Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/mem2reg.cl

raw
1 // RUN: %clang_cc1 -O0 -S -triple spir-unknown-unknown -cl-std=CL2.0 -x cl -disable-O0-optnone %s -emit-llvm-bc -o %t.bc
2 // RUN: llvm-spirv -s %t.bc
3 // RUN: llvm-dis < %t.bc | FileCheck %s --check-prefixes=CHECK-WO
4 // RUN: llvm-spirv -s -spirv-mem2reg %t.bc -o %t.opt.bc
5 // RUN: llvm-dis < %t.opt.bc | FileCheck %s --check-prefixes=CHECK-W
6 // CHECK-W-LABEL: spir_func void @foo
7 // CHECK-W-NOT: alloca
8 // CHECK-WO-LABEL: spir_kernel void @foo
9 // CHECK-WO: alloca
10 __kernel void foo(__global int *a) {
11 *a = *a + 1;
12 }