1 // RUN: %clang_cc1 -no-opaque-pointers -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(%struct.A* noundef nonnull align 8 dereferenceable(8) %this) 7 // CHECK: store %struct.A* %this, %struct.A** %this.addr.ascast 8 // CHECK: %this1 = load %struct.A*, %struct.A** %this.addr.ascast 9 // CHECK: %[[VTFIELD:.*]] = bitcast %struct.A* %this1 to i32 (...)* addrspace(1)** 10 // CHECK: store i32 (...)* addrspace(1)* bitcast{{.*}} @_ZTV1A{{.*}}, i32 (...)* addrspace(1)** %[[VTFIELD]] 11 struct A { 12 __device__ virtual void vf() {} 13 }; 14 15 __global__ void kern() { 16 A a; 17 } 18