Debian Codegraph @

clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp

raw
1 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s
2
3 class P {
4 public:
5 P(const P &Rhs) = default;
6
7 long A;
8 long B;
9 };
10
11 void foo(__global P *GPtr) {
12 // CHECK: call void @llvm.memcpy{{.*}}, {{.*}}, i32 16
13 P Val = GPtr[0];
14 }
15
16 struct __attribute__((packed)) A { int X; };
17 int test(__global A *GPtr) {
18 // CHECK: {{.*}} = load i32, {{.*}}, align 1
19 return static_cast<__generic A &>(*GPtr).X;
20 }