~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/clang/disable-test/CodeGenOpenCLCXX/address-space-deduction2.cl -rw-r--r-- 444 bytes
461e0617Itoh Shimon re-enable tests. 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -O0 -emit-llvm -o - | FileCheck %s

class P {
public:
  P(const P &Rhs) = default;

  long A;
  long B;
};

void foo(__global P *GPtr) {
// CHECK: call void @llvm.memcpy{{.*}}, {{.*}}, i32 16
  P Val = GPtr[0];
}

struct __attribute__((packed)) A { int X; };
int test(__global A *GPtr) {
// CHECK: {{.*}} = load i32, {{.*}}, align 1
  return static_cast<__generic A &>(*GPtr).X;
}