diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 | 
| commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
| tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp | |
| parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp')
| -rw-r--r-- | test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp | 136 | 
1 files changed, 68 insertions, 68 deletions
| diff --git a/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp index 7a00a731f5fa..b868d1f0b516 100644 --- a/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp +++ b/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp @@ -21,29 +21,29 @@ struct B : virtual VBase {  B::B() {    // CHECK-LABEL: define x86_thiscallcc %struct.B* @"\01??0B@@QAE@XZ" -  // CHECK:   %[[THIS:.*]] = load %struct.B** +  // CHECK:   %[[THIS:.*]] = load %struct.B*, %struct.B**    // CHECK:   br i1 %{{.*}}, label %[[INIT_VBASES:.*]], label %[[SKIP_VBASES:.*]]    // Don't check the INIT_VBASES case as it's covered by the ctor tests.    // CHECK: %[[SKIP_VBASES]]    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 0 +  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 0    // ...    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VFPTR_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 %{{.*}} +  // CHECK:   %[[VFPTR_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 %{{.*}}    // CHECK:   %[[VFPTR:.*]] = bitcast i8* %[[VFPTR_i8]] to i32 (...)***    // CHECK:   store i32 (...)** bitcast ([3 x i8*]* @"\01??_7B@@6B@" to i32 (...)**), i32 (...)*** %[[VFPTR]]    // Initialize vtorDisp:    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 0 +  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 0    // ...    // CHECK:   %[[VBASE_OFFSET:.*]] = add nsw i32 0, %{{.*}}    // CHECK:   %[[VTORDISP_VAL:.*]] = sub i32 %[[VBASE_OFFSET]], 8    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 %[[VBASE_OFFSET]] -  // CHECK:   %[[VTORDISP_i8:.*]] = getelementptr i8* %[[VBASE_i8]], i32 -4 +  // CHECK:   %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 %[[VBASE_OFFSET]] +  // CHECK:   %[[VTORDISP_i8:.*]] = getelementptr i8, i8* %[[VBASE_i8]], i32 -4    // CHECK:   %[[VTORDISP_PTR:.*]] = bitcast i8* %[[VTORDISP_i8]] to i32*    // CHECK:   store i32 %[[VTORDISP_VAL]], i32* %[[VTORDISP_PTR]] @@ -54,29 +54,29 @@ B::~B() {    // CHECK-LABEL: define x86_thiscallcc void @"\01??1B@@UAE@XZ"    // Adjust the this parameter:    // CHECK:   %[[THIS_PARAM_i8:.*]] = bitcast %struct.B* {{.*}} to i8* -  // CHECK:   %[[THIS_i8:.*]] = getelementptr inbounds i8* %[[THIS_PARAM_i8]], i32 -8 +  // CHECK:   %[[THIS_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_PARAM_i8]], i32 -8    // CHECK:   %[[THIS:.*]] = bitcast i8* %[[THIS_i8]] to %struct.B*    // CHECK:   store %struct.B* %[[THIS]], %struct.B** %[[THIS_ADDR:.*]], align 4 -  // CHECK:   %[[THIS:.*]] = load %struct.B** %[[THIS_ADDR]] +  // CHECK:   %[[THIS:.*]] = load %struct.B*, %struct.B** %[[THIS_ADDR]]    // Restore the vfptr that could have been changed by a subclass.    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 0 +  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 0    // ...    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VFPTR_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 %{{.*}} +  // CHECK:   %[[VFPTR_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 %{{.*}}    // CHECK:   %[[VFPTR:.*]] = bitcast i8* %[[VFPTR_i8]] to i32 (...)***    // CHECK:   store i32 (...)** bitcast ([3 x i8*]* @"\01??_7B@@6B@" to i32 (...)**), i32 (...)*** %[[VFPTR]]    // Initialize vtorDisp:    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 0 +  // CHECK:   %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 0    // ...    // CHECK:   %[[VBASE_OFFSET:.*]] = add nsw i32 0, %{{.*}}    // CHECK:   %[[VTORDISP_VAL:.*]] = sub i32 %[[VBASE_OFFSET]], 8    // CHECK:   %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK:   %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 %[[VBASE_OFFSET]] -  // CHECK:   %[[VTORDISP_i8:.*]] = getelementptr i8* %[[VBASE_i8]], i32 -4 +  // CHECK:   %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i32 %[[VBASE_OFFSET]] +  // CHECK:   %[[VTORDISP_i8:.*]] = getelementptr i8, i8* %[[VBASE_i8]], i32 -4    // CHECK:   %[[VTORDISP_PTR:.*]] = bitcast i8* %[[VTORDISP_i8]] to i32*    // CHECK:   store i32 %[[VTORDISP_VAL]], i32* %[[VTORDISP_PTR]] @@ -85,23 +85,23 @@ B::~B() {    // CHECK: ret    // CHECK2-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_DB@@UAE@XZ"(%struct.B* -  // CHECK2: %[[THIS:.*]] = load %struct.B** {{.*}} +  // CHECK2: %[[THIS:.*]] = load %struct.B*, %struct.B** {{.*}}    // CHECK2: %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK2: %[[B_i8:.*]] = getelementptr i8* %[[THIS_i8]], i32 8 +  // CHECK2: %[[B_i8:.*]] = getelementptr i8, i8* %[[THIS_i8]], i32 8    // CHECK2: %[[B:.*]] = bitcast i8* %[[B_i8]] to %struct.B*    // CHECK2: call x86_thiscallcc void @"\01??1B@@UAE@XZ"(%struct.B* %[[B]])    // CHECK2: %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -  // CHECK2: %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i64 8 +  // CHECK2: %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_i8]], i64 8    // CHECK2: %[[VBASE:.*]] = bitcast i8* %[[VBASE_i8]] to %struct.VBase*    // CHECK2: call x86_thiscallcc void @"\01??1VBase@@UAE@XZ"(%struct.VBase* %[[VBASE]])    // CHECK2: ret    // CHECK2-LABEL: define linkonce_odr x86_thiscallcc i8* @"\01??_GB@@UAEPAXI@Z"    // CHECK2:   %[[THIS_PARAM_i8:.*]] = bitcast %struct.B* {{.*}} to i8* -  // CHECK2:   %[[THIS_i8:.*]] = getelementptr inbounds i8* %[[THIS_PARAM_i8:.*]], i32 -8 +  // CHECK2:   %[[THIS_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS_PARAM_i8:.*]], i32 -8    // CHECK2:   %[[THIS:.*]] = bitcast i8* %[[THIS_i8]] to %struct.B*    // CHECK2:   store %struct.B* %[[THIS]], %struct.B** %[[THIS_ADDR:.*]], align 4 -  // CHECK2:   %[[THIS:.*]] = load %struct.B** %[[THIS_ADDR]] +  // CHECK2:   %[[THIS:.*]] = load %struct.B*, %struct.B** %[[THIS_ADDR]]    // CHECK2:   call x86_thiscallcc void @"\01??_DB@@UAE@XZ"(%struct.B* %[[THIS]])    // ...    // CHECK2: ret @@ -114,23 +114,23 @@ void B::foo() {  // need to adjust 'this' before use.  //  // CHECK: %[[THIS_ADDR:.*]] = alloca %struct.B*, align 4 -// CHECK: %[[THIS_i8:.*]] = getelementptr inbounds i8* %[[ECX:.*]], i32 -8 +// CHECK: %[[THIS_i8:.*]] = getelementptr inbounds i8, i8* %[[ECX:.*]], i32 -8  // CHECK: %[[THIS:.*]] = bitcast i8* %[[THIS_i8]] to %struct.B*  // CHECK: store %struct.B* %[[THIS]], %struct.B** %[[THIS_ADDR]], align 4    field = 42; -// CHECK: %[[THIS:.*]] = load %struct.B** %[[THIS_ADDR]] +// CHECK: %[[THIS:.*]] = load %struct.B*, %struct.B** %[[THIS_ADDR]]  // CHECK: %[[THIS8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8* %[[THIS8]], i32 0 +// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[THIS8]], i32 0  // CHECK: %[[VBPTR8:.*]] = bitcast i8* %[[VBPTR]] to i32** -// CHECK: %[[VBTABLE:.*]] = load i32** %[[VBPTR8]] -// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32* %[[VBTABLE]], i32 1 -// CHECK: %[[VBOFFSET32:.*]] = load i32* %[[VBENTRY]] +// CHECK: %[[VBTABLE:.*]] = load i32*, i32** %[[VBPTR8]] +// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32, i32* %[[VBTABLE]], i32 1 +// CHECK: %[[VBOFFSET32:.*]] = load i32, i32* %[[VBENTRY]]  // CHECK: %[[VBOFFSET:.*]] = add nsw i32 0, %[[VBOFFSET32]]  // CHECK: %[[THIS8:.*]] = bitcast %struct.B* %[[THIS]] to i8* -// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[THIS8]], i32 %[[VBOFFSET]] +// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[THIS8]], i32 %[[VBOFFSET]]  // CHECK: %[[VBASE:.*]] = bitcast i8* %[[VBASE_i8]] to %struct.VBase* -// CHECK: %[[FIELD:.*]] = getelementptr inbounds %struct.VBase* %[[VBASE]], i32 0, i32 1 +// CHECK: %[[FIELD:.*]] = getelementptr inbounds %struct.VBase, %struct.VBase* %[[VBASE]], i32 0, i32 1  // CHECK: store i32 42, i32* %[[FIELD]], align 4  //  // CHECK: ret void @@ -145,26 +145,26 @@ void call_vbase_bar(B *obj) {  // at the caller site.  //  // CHECK: %[[OBJ_i8:.*]] = bitcast %struct.B* %[[OBJ]] to i8* -// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 0 +// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 0  // CHECK: %[[VBPTR8:.*]] = bitcast i8* %[[VBPTR]] to i32** -// CHECK: %[[VBTABLE:.*]] = load i32** %[[VBPTR8]] -// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32* %[[VBTABLE]], i32 1 -// CHECK: %[[VBOFFSET32:.*]] = load i32* %[[VBENTRY]] +// CHECK: %[[VBTABLE:.*]] = load i32*, i32** %[[VBPTR8]] +// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32, i32* %[[VBTABLE]], i32 1 +// CHECK: %[[VBOFFSET32:.*]] = load i32, i32* %[[VBENTRY]]  // CHECK: %[[VBOFFSET:.*]] = add nsw i32 0, %[[VBOFFSET32]] -// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 %[[VBOFFSET]] +// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 %[[VBOFFSET]]  // CHECK: %[[VFPTR:.*]] = bitcast i8* %[[VBASE_i8]] to void (i8*)*** -// CHECK: %[[VFTABLE:.*]] = load void (i8*)*** %[[VFPTR]] -// CHECK: %[[VFUN:.*]] = getelementptr inbounds void (i8*)** %[[VFTABLE]], i64 2 -// CHECK: %[[VFUN_VALUE:.*]] = load void (i8*)** %[[VFUN]] +// CHECK: %[[VFTABLE:.*]] = load void (i8*)**, void (i8*)*** %[[VFPTR]] +// CHECK: %[[VFUN:.*]] = getelementptr inbounds void (i8*)*, void (i8*)** %[[VFTABLE]], i64 2 +// CHECK: %[[VFUN_VALUE:.*]] = load void (i8*)*, void (i8*)** %[[VFUN]]  //  // CHECK: %[[OBJ_i8:.*]] = bitcast %struct.B* %[[OBJ]] to i8* -// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 0 +// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 0  // CHECK: %[[VBPTR8:.*]] = bitcast i8* %[[VBPTR]] to i32** -// CHECK: %[[VBTABLE:.*]] = load i32** %[[VBPTR8]] -// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32* %[[VBTABLE]], i32 1 -// CHECK: %[[VBOFFSET32:.*]] = load i32* %[[VBENTRY]] +// CHECK: %[[VBTABLE:.*]] = load i32*, i32** %[[VBPTR8]] +// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32, i32* %[[VBTABLE]], i32 1 +// CHECK: %[[VBOFFSET32:.*]] = load i32, i32* %[[VBENTRY]]  // CHECK: %[[VBOFFSET:.*]] = add nsw i32 0, %[[VBOFFSET32]] -// CHECK: %[[VBASE:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 %[[VBOFFSET]] +// CHECK: %[[VBASE:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 %[[VBOFFSET]]  //  // CHECK: call x86_thiscallcc void %[[VFUN_VALUE]](i8* %[[VBASE]])  // @@ -177,26 +177,26 @@ void delete_B(B *obj) {    delete obj;  // CHECK: %[[OBJ_i8:.*]] = bitcast %struct.B* %[[OBJ]] to i8* -// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 0 +// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 0  // CHECK: %[[VBPTR8:.*]] = bitcast i8* %[[VBPTR]] to i32** -// CHECK: %[[VBTABLE:.*]] = load i32** %[[VBPTR8]] -// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32* %[[VBTABLE]], i32 1 -// CHECK: %[[VBOFFSET32:.*]] = load i32* %[[VBENTRY]] +// CHECK: %[[VBTABLE:.*]] = load i32*, i32** %[[VBPTR8]] +// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32, i32* %[[VBTABLE]], i32 1 +// CHECK: %[[VBOFFSET32:.*]] = load i32, i32* %[[VBENTRY]]  // CHECK: %[[VBOFFSET:.*]] = add nsw i32 0, %[[VBOFFSET32]] -// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 %[[VBOFFSET]] +// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 %[[VBOFFSET]]  // CHECK: %[[VFPTR:.*]] = bitcast i8* %[[VBASE_i8]] to i8* (%struct.B*, i32)*** -// CHECK: %[[VFTABLE:.*]] = load i8* (%struct.B*, i32)*** %[[VFPTR]] -// CHECK: %[[VFUN:.*]] = getelementptr inbounds i8* (%struct.B*, i32)** %[[VFTABLE]], i64 0 -// CHECK: %[[VFUN_VALUE:.*]] = load i8* (%struct.B*, i32)** %[[VFUN]] +// CHECK: %[[VFTABLE:.*]] = load i8* (%struct.B*, i32)**, i8* (%struct.B*, i32)*** %[[VFPTR]] +// CHECK: %[[VFUN:.*]] = getelementptr inbounds i8* (%struct.B*, i32)*, i8* (%struct.B*, i32)** %[[VFTABLE]], i64 0 +// CHECK: %[[VFUN_VALUE:.*]] = load i8* (%struct.B*, i32)*, i8* (%struct.B*, i32)** %[[VFUN]]  //  // CHECK: %[[OBJ_i8:.*]] = bitcast %struct.B* %[[OBJ]] to i8* -// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 0 +// CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 0  // CHECK: %[[VBPTR8:.*]] = bitcast i8* %[[VBPTR]] to i32** -// CHECK: %[[VBTABLE:.*]] = load i32** %[[VBPTR8]] -// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32* %[[VBTABLE]], i32 1 -// CHECK: %[[VBOFFSET32:.*]] = load i32* %[[VBENTRY]] +// CHECK: %[[VBTABLE:.*]] = load i32*, i32** %[[VBPTR8]] +// CHECK: %[[VBENTRY:.*]] = getelementptr inbounds i32, i32* %[[VBTABLE]], i32 1 +// CHECK: %[[VBOFFSET32:.*]] = load i32, i32* %[[VBENTRY]]  // CHECK: %[[VBOFFSET:.*]] = add nsw i32 0, %[[VBOFFSET32]] -// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 %[[VBOFFSET]] +// CHECK: %[[VBASE_i8:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 %[[VBOFFSET]]  // CHECK: %[[VBASE:.*]] = bitcast i8* %[[VBASE_i8]] to %struct.B*  //  // CHECK: call x86_thiscallcc i8* %[[VFUN_VALUE]](%struct.B* %[[VBASE]], i32 1) @@ -285,22 +285,22 @@ struct D : virtual Z, B, C {  D::~D() {    // CHECK-LABEL: define x86_thiscallcc void @"\01??1D@diamond@@UAE@XZ"(%"struct.diamond::D"*)    // CHECK: %[[ARG_i8:.*]] = bitcast %"struct.diamond::D"* %{{.*}} to i8* -  // CHECK: %[[THIS_i8:.*]] = getelementptr inbounds i8* %[[ARG_i8]], i32 -24 +  // CHECK: %[[THIS_i8:.*]] = getelementptr inbounds i8, i8* %[[ARG_i8]], i32 -24    // CHECK: %[[THIS:.*]] = bitcast i8* %[[THIS_i8]] to %"struct.diamond::D"*    // CHECK: store %"struct.diamond::D"* %[[THIS]], %"struct.diamond::D"** %[[THIS_VAL:.*]], align 4 -  // CHECK: %[[THIS:.*]] = load %"struct.diamond::D"** %[[THIS_VAL]] +  // CHECK: %[[THIS:.*]] = load %"struct.diamond::D"*, %"struct.diamond::D"** %[[THIS_VAL]]    // CHECK: %[[D_i8:.*]] = bitcast %"struct.diamond::D"* %[[THIS]] to i8* -  // CHECK: %[[C_i8:.*]] = getelementptr inbounds i8* %[[D_i8]], i64 4 +  // CHECK: %[[C_i8:.*]] = getelementptr inbounds i8, i8* %[[D_i8]], i64 4    // CHECK: %[[C:.*]] = bitcast i8* %[[C_i8]] to %"struct.diamond::C"*    // CHECK: %[[C_i8:.*]] = bitcast %"struct.diamond::C"* %[[C]] to i8* -  // CHECK: %[[ARG_i8:.*]] = getelementptr i8* %{{.*}}, i32 16 +  // CHECK: %[[ARG_i8:.*]] = getelementptr i8, i8* %{{.*}}, i32 16    // FIXME: We might consider changing the dtor this parameter type to i8*.    // CHECK: %[[ARG:.*]] = bitcast i8* %[[ARG_i8]] to %"struct.diamond::C"*    // CHECK: call x86_thiscallcc void @"\01??1C@diamond@@UAE@XZ"(%"struct.diamond::C"* %[[ARG]])    // CHECK: %[[B:.*]] = bitcast %"struct.diamond::D"* %[[THIS]] to %"struct.diamond::B"*    // CHECK: %[[B_i8:.*]] = bitcast %"struct.diamond::B"* %[[B]] to i8* -  // CHECK: %[[ARG_i8:.*]] = getelementptr i8* %[[B_i8]], i32 4 +  // CHECK: %[[ARG_i8:.*]] = getelementptr i8, i8* %[[B_i8]], i32 4    // CHECK: %[[ARG:.*]] = bitcast i8* %[[ARG_i8]] to %"struct.diamond::B"*    // CHECK: call x86_thiscallcc void @"\01??1B@diamond@@UAE@XZ"(%"struct.diamond::B"* %[[ARG]])    // CHECK: ret void @@ -362,12 +362,12 @@ void D::bar() {    C::foo();    // Shouldn't need any vbtable lookups.  All we have to do is adjust to C*,    // then compensate for the adjustment performed in the C::foo() prologue. -  // CHECK-NOT: load i8** +  // CHECK-NOT: load i8*, i8**    // CHECK: %[[OBJ_i8:.*]] = bitcast %"struct.test3::D"* %{{.*}} to i8* -  // CHECK: %[[C_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 8 +  // CHECK: %[[C_i8:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 8    // CHECK: %[[C:.*]] = bitcast i8* %[[C_i8]] to %"struct.test3::C"*    // CHECK: %[[C_i8:.*]] = bitcast %"struct.test3::C"* %[[C]] to i8* -  // CHECK: %[[ARG:.*]] = getelementptr i8* %[[C_i8]], i32 4 +  // CHECK: %[[ARG:.*]] = getelementptr i8, i8* %[[C_i8]], i32 4    // CHECK: call x86_thiscallcc void @"\01?foo@C@test3@@UAEXXZ"(i8* %[[ARG]])    // CHECK: ret  } @@ -408,9 +408,9 @@ void destroy(C *obj) {    delete obj;    // CHECK: %[[VPTR:.*]] = bitcast %"struct.test4::C"* %[[OBJ:.*]] to i8* (%"struct.test4::C"*, i32)*** -  // CHECK: %[[VFTABLE:.*]] = load i8* (%"struct.test4::C"*, i32)*** %[[VPTR]] -  // CHECK: %[[VFTENTRY:.*]] = getelementptr inbounds i8* (%"struct.test4::C"*, i32)** %[[VFTABLE]], i64 0 -  // CHECK: %[[VFUN:.*]] = load i8* (%"struct.test4::C"*, i32)** %[[VFTENTRY]] +  // CHECK: %[[VFTABLE:.*]] = load i8* (%"struct.test4::C"*, i32)**, i8* (%"struct.test4::C"*, i32)*** %[[VPTR]] +  // CHECK: %[[VFTENTRY:.*]] = getelementptr inbounds i8* (%"struct.test4::C"*, i32)*, i8* (%"struct.test4::C"*, i32)** %[[VFTABLE]], i64 0 +  // CHECK: %[[VFUN:.*]] = load i8* (%"struct.test4::C"*, i32)*, i8* (%"struct.test4::C"*, i32)** %[[VFTENTRY]]    // CHECK: call x86_thiscallcc i8* %[[VFUN]](%"struct.test4::C"* %[[OBJ]], i32 1)    // CHECK: ret  } @@ -441,13 +441,13 @@ void destroy(E *obj) {    // CHECK-NOT: getelementptr    // CHECK: %[[OBJ_i8:.*]] = bitcast %"struct.test4::E"* %[[OBJ:.*]] to i8* -  // CHECK: %[[B_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 4 +  // CHECK: %[[B_i8:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 4    // CHECK: %[[VPTR:.*]] = bitcast i8* %[[B_i8]] to i8* (%"struct.test4::E"*, i32)*** -  // CHECK: %[[VFTABLE:.*]] = load i8* (%"struct.test4::E"*, i32)*** %[[VPTR]] -  // CHECK: %[[VFTENTRY:.*]] = getelementptr inbounds i8* (%"struct.test4::E"*, i32)** %[[VFTABLE]], i64 0 -  // CHECK: %[[VFUN:.*]] = load i8* (%"struct.test4::E"*, i32)** %[[VFTENTRY]] +  // CHECK: %[[VFTABLE:.*]] = load i8* (%"struct.test4::E"*, i32)**, i8* (%"struct.test4::E"*, i32)*** %[[VPTR]] +  // CHECK: %[[VFTENTRY:.*]] = getelementptr inbounds i8* (%"struct.test4::E"*, i32)*, i8* (%"struct.test4::E"*, i32)** %[[VFTABLE]], i64 0 +  // CHECK: %[[VFUN:.*]] = load i8* (%"struct.test4::E"*, i32)*, i8* (%"struct.test4::E"*, i32)** %[[VFTENTRY]]    // CHECK: %[[OBJ_i8:.*]] = bitcast %"struct.test4::E"* %[[OBJ]] to i8* -  // CHECK: %[[B_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 4 +  // CHECK: %[[B_i8:.*]] = getelementptr inbounds i8, i8* %[[OBJ_i8]], i32 4    // FIXME: in fact, the call should take i8* and the bitcast is redundant.    // CHECK: %[[B_as_E:.*]] = bitcast i8* %[[B_i8]] to %"struct.test4::E"*    // CHECK: call x86_thiscallcc i8* %[[VFUN]](%"struct.test4::E"* %[[B_as_E]], i32 1) | 
