xref: /llvm-project/clang/test/CodeGenCUDA/vtbl.cu (revision f46b0e6d75fa84d2d2d9805e3d2be2c1e6c140f1)
1 // RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -target-cpu gfx906 \
2 // RUN:   -emit-llvm -o - %s | FileCheck %s
3 
4 #include "Inputs/cuda.h"
5 
6 // CHECK-LABEL: define {{.*}}@_ZN1AC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %this)
7 // CHECK: store ptr %this, ptr %this.addr.ascast
8 // CHECK: %this1 = load ptr, ptr %this.addr.ascast
9 // CHECK: store ptr addrspace(1) {{.*}} @_ZTV1A{{.*}}, ptr %this1
10 struct A {
vfA11   __device__ virtual void vf() {}
12 };
13 
kern()14 __global__ void kern() {
15   A a;
16 }
17