aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit5e20cdd81c44a443562a09007668ffdf76c455af (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGenCXX/microsoft-abi-member-pointers.cpp
parentd5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff)
downloadsrc-5e20cdd81c44a443562a09007668ffdf76c455af.tar.gz
src-5e20cdd81c44a443562a09007668ffdf76c455af.zip
Vendor import of clang trunk r238337:vendor/clang/clang-trunk-r238337
Notes
Notes: svn path=/vendor/clang/dist/; revision=283627 svn path=/vendor/clang/clang-trunk-r238337/; revision=283628; tag=vendor/clang/clang-trunk-r238337
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-member-pointers.cpp')
-rwxr-xr-xtest/CodeGenCXX/microsoft-abi-member-pointers.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-member-pointers.cpp b/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
index 719cb70679f4..c12ceae131a6 100755
--- a/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
+++ b/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
@@ -80,20 +80,20 @@ int UnspecSingle::*us_d_memptr;
// CHECK: @"\01?p_d_memptr@@3PQPolymorphic@@HQ1@" = global i32 0, align 4
// CHECK: @"\01?m_d_memptr@@3PQMultiple@@HQ1@" = global i32 -1, align 4
// CHECK: @"\01?v_d_memptr@@3PQVirtual@@HQ1@" = global { i32, i32 }
-// CHECK: { i32 0, i32 -1 }, align 8
+// CHECK: { i32 0, i32 -1 }, align 4
// CHECK: @"\01?n_d_memptr@@3PQNonZeroVBPtr@@HQ1@" = global { i32, i32 }
-// CHECK: { i32 0, i32 -1 }, align 8
+// CHECK: { i32 0, i32 -1 }, align 4
// CHECK: @"\01?u_d_memptr@@3PQUnspecified@@HQ1@" = global { i32, i32, i32 }
-// CHECK: { i32 0, i32 0, i32 -1 }, align 8
+// CHECK: { i32 0, i32 0, i32 -1 }, align 4
// CHECK: @"\01?us_d_memptr@@3PQUnspecSingle@@HQ1@" = global { i32, i32, i32 }
-// CHECK: { i32 0, i32 0, i32 -1 }, align 8
+// CHECK: { i32 0, i32 0, i32 -1 }, align 4
void (Single ::*s_f_memptr)();
void (Multiple::*m_f_memptr)();
void (Virtual ::*v_f_memptr)();
// CHECK: @"\01?s_f_memptr@@3P8Single@@AEXXZQ1@" = global i8* null, align 4
-// CHECK: @"\01?m_f_memptr@@3P8Multiple@@AEXXZQ1@" = global { i8*, i32 } zeroinitializer, align 8
-// CHECK: @"\01?v_f_memptr@@3P8Virtual@@AEXXZQ1@" = global { i8*, i32, i32 } zeroinitializer, align 8
+// CHECK: @"\01?m_f_memptr@@3P8Multiple@@AEXXZQ1@" = global { i8*, i32 } zeroinitializer, align 4
+// CHECK: @"\01?v_f_memptr@@3P8Virtual@@AEXXZQ1@" = global { i8*, i32, i32 } zeroinitializer, align 4
// We can define Unspecified after locking in the inheritance model.
struct Unspecified : Multiple, Virtual {
@@ -115,13 +115,13 @@ void (UnspecSingle::*us_f_mp)() = &UnspecSingle::foo;
// CHECK: @"\01?s_f_mp@Const@@3P8Single@@AEXXZQ2@" =
// CHECK: global i8* bitcast ({{.*}} @"\01?foo@Single@@QAEXXZ" to i8*), align 4
// CHECK: @"\01?m_f_mp@Const@@3P8Multiple@@AEXXZQ2@" =
-// CHECK: global { i8*, i32 } { i8* bitcast ({{.*}} @"\01?foo@B2@@QAEXXZ" to i8*), i32 4 }, align 8
+// CHECK: global { i8*, i32 } { i8* bitcast ({{.*}} @"\01?foo@B2@@QAEXXZ" to i8*), i32 4 }, align 4
// CHECK: @"\01?v_f_mp@Const@@3P8Virtual@@AEXXZQ2@" =
-// CHECK: global { i8*, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Virtual@@QAEXXZ" to i8*), i32 0, i32 0 }, align 8
+// CHECK: global { i8*, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Virtual@@QAEXXZ" to i8*), i32 0, i32 0 }, align 4
// CHECK: @"\01?u_f_mp@Const@@3P8Unspecified@@AEXXZQ2@" =
-// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Unspecified@@QAEXXZ" to i8*), i32 0, i32 12, i32 0 }, align 8
+// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Unspecified@@QAEXXZ" to i8*), i32 0, i32 12, i32 0 }, align 4
// CHECK: @"\01?us_f_mp@Const@@3P8UnspecSingle@@AEXXZQ2@" =
-// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@UnspecSingle@@QAEXXZ" to i8*), i32 0, i32 0, i32 0 }, align 8
+// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@UnspecSingle@@QAEXXZ" to i8*), i32 0, i32 0, i32 0 }, align 4
}
namespace CastParam {
@@ -143,11 +143,11 @@ void (A::*ptr1)(void *) = (void (A::*)(void *)) &A::foo;
// Try a reinterpret_cast followed by a memptr conversion.
void (C::*ptr2)(void *) = (void (C::*)(void *)) (void (A::*)(void *)) &A::foo;
// CHECK: @"\01?ptr2@CastParam@@3P8C@1@AEXPAX@ZQ21@" =
-// CHECK: global { i8*, i32 } { i8* bitcast (void ({{.*}})* @"\01?foo@A@CastParam@@QAEXPAU12@@Z" to i8*), i32 4 }, align 8
+// CHECK: global { i8*, i32 } { i8* bitcast (void ({{.*}})* @"\01?foo@A@CastParam@@QAEXPAU12@@Z" to i8*), i32 4 }, align 4
void (C::*ptr3)(void *) = (void (C::*)(void *)) (void (A::*)(void *)) (void (A::*)(A *)) 0;
// CHECK: @"\01?ptr3@CastParam@@3P8C@1@AEXPAX@ZQ21@" =
-// CHECK: global { i8*, i32 } zeroinitializer, align 8
+// CHECK: global { i8*, i32 } zeroinitializer, align 4
struct D : C {
virtual void isPolymorphic();
@@ -180,23 +180,23 @@ void EmitNonVirtualMemberPointers() {
void (UnspecWithVBPtr::*u2_f_memptr)() = &UnspecWithVBPtr::foo;
// CHECK: define void @"\01?EmitNonVirtualMemberPointers@@YAXXZ"() {{.*}} {
// CHECK: alloca i8*, align 4
-// CHECK: alloca { i8*, i32 }, align 8
-// CHECK: alloca { i8*, i32, i32 }, align 8
-// CHECK: alloca { i8*, i32, i32, i32 }, align 8
+// CHECK: alloca { i8*, i32 }, align 4
+// CHECK: alloca { i8*, i32, i32 }, align 4
+// CHECK: alloca { i8*, i32, i32, i32 }, align 4
// CHECK: store i8* bitcast (void (%{{.*}}*)* @"\01?foo@Single@@QAEXXZ" to i8*), i8** %{{.*}}, align 4
// CHECK: store { i8*, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@Multiple@@QAEXXZ" to i8*), i32 0 },
-// CHECK: { i8*, i32 }* %{{.*}}, align 8
+// CHECK: { i8*, i32 }* %{{.*}}, align 4
// CHECK: store { i8*, i32, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@Virtual@@QAEXXZ" to i8*), i32 0, i32 0 },
-// CHECK: { i8*, i32, i32 }* %{{.*}}, align 8
+// CHECK: { i8*, i32, i32 }* %{{.*}}, align 4
// CHECK: store { i8*, i32, i32, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@Unspecified@@QAEXXZ" to i8*), i32 0, i32 12, i32 0 },
-// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 4
// CHECK: store { i8*, i32, i32, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@UnspecWithVBPtr@@QAEXXZ" to i8*),
// CHECK: i32 0, i32 4, i32 0 },
-// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 4
// CHECK: ret void
// CHECK: }
}
@@ -212,7 +212,7 @@ void podMemPtrs() {
// CHECK: %[[memptr:.*]] = alloca i32, align 4
// CHECK-NEXT: store i32 0, i32* %[[memptr]], align 4
// CHECK-NEXT: store i32 4, i32* %[[memptr]], align 4
-// CHECK-NEXT: %[[memptr_val:.*]] = load i32* %[[memptr]], align 4
+// CHECK-NEXT: %[[memptr_val:.*]] = load i32, i32* %[[memptr]], align 4
// CHECK-NEXT: %{{.*}} = icmp ne i32 %[[memptr_val]], -1
// CHECK-NEXT: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
// CHECK: store i32 -1, i32* %[[memptr]], align 4
@@ -232,7 +232,7 @@ void polymorphicMemPtrs() {
// CHECK: %[[memptr:.*]] = alloca i32, align 4
// CHECK-NEXT: store i32 4, i32* %[[memptr]], align 4
// CHECK-NEXT: store i32 8, i32* %[[memptr]], align 4
-// CHECK-NEXT: %[[memptr_val:.*]] = load i32* %[[memptr]], align 4
+// CHECK-NEXT: %[[memptr_val:.*]] = load i32, i32* %[[memptr]], align 4
// CHECK-NEXT: %{{.*}} = icmp ne i32 %[[memptr_val]], 0
// CHECK-NEXT: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
// CHECK: store i32 0, i32* %[[memptr]], align 4
@@ -243,9 +243,9 @@ void polymorphicMemPtrs() {
bool nullTestDataUnspecified(int Unspecified::*mp) {
return mp;
// CHECK: define zeroext i1 @"\01?nullTestDataUnspecified@@YA_NPQUnspecified@@H@Z"{{.*}} {
-// CHECK: %{{.*}} = load { i32, i32, i32 }* %{{.*}}, align 8
-// CHECK: store { i32, i32, i32 } {{.*}} align 8
-// CHECK: %[[mp:.*]] = load { i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: %{{.*}} = load { i32, i32, i32 }, { i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: store { i32, i32, i32 } {{.*}} align 4
+// CHECK: %[[mp:.*]] = load { i32, i32, i32 }, { i32, i32, i32 }* %{{.*}}, align 4
// CHECK: %[[mp0:.*]] = extractvalue { i32, i32, i32 } %[[mp]], 0
// CHECK: %[[cmp0:.*]] = icmp ne i32 %[[mp0]], 0
// CHECK: %[[mp1:.*]] = extractvalue { i32, i32, i32 } %[[mp]], 1
@@ -265,9 +265,9 @@ bool nullTestDataUnspecified(int Unspecified::*mp) {
bool nullTestFunctionUnspecified(void (Unspecified::*mp)()) {
return mp;
// CHECK: define zeroext i1 @"\01?nullTestFunctionUnspecified@@YA_NP8Unspecified@@AEXXZ@Z"{{.*}} {
-// CHECK: %{{.*}} = load { i8*, i32, i32, i32 }* %{{.*}}, align 8
-// CHECK: store { i8*, i32, i32, i32 } {{.*}} align 8
-// CHECK: %[[mp:.*]] = load { i8*, i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: %{{.*}} = load { i8*, i32, i32, i32 }, { i8*, i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: store { i8*, i32, i32, i32 } {{.*}} align 4
+// CHECK: %[[mp:.*]] = load { i8*, i32, i32, i32 }, { i8*, i32, i32, i32 }* %{{.*}}, align 4
// CHECK: %[[mp0:.*]] = extractvalue { i8*, i32, i32, i32 } %[[mp]], 0
// CHECK: %[[cmp0:.*]] = icmp ne i8* %[[mp0]], null
// CHECK: ret i1 %[[cmp0]]
@@ -279,21 +279,21 @@ int loadDataMemberPointerVirtual(Virtual *o, int Virtual::*memptr) {
// Test that we can unpack this aggregate member pointer and load the member
// data pointer.
// CHECK: define i32 @"\01?loadDataMemberPointerVirtual@@YAHPAUVirtual@@PQ1@H@Z"{{.*}} {
-// CHECK: %[[o:.*]] = load %{{.*}}** %{{.*}}, align 4
-// CHECK: %[[memptr:.*]] = load { i32, i32 }* %{{.*}}, align 8
+// CHECK: %[[o:.*]] = load %{{.*}}*, %{{.*}}** %{{.*}}, align 4
+// CHECK: %[[memptr:.*]] = load { i32, i32 }, { i32, i32 }* %{{.*}}, align 4
// CHECK: %[[memptr0:.*]] = extractvalue { i32, i32 } %[[memptr:.*]], 0
// CHECK: %[[memptr1:.*]] = extractvalue { i32, i32 } %[[memptr:.*]], 1
// CHECK: %[[v6:.*]] = bitcast %{{.*}}* %[[o]] to i8*
-// CHECK: %[[vbptr:.*]] = getelementptr inbounds i8* %[[v6]], i32 0
+// CHECK: %[[vbptr:.*]] = getelementptr inbounds i8, i8* %[[v6]], i32 0
// CHECK: %[[vbptr_a:.*]] = bitcast i8* %[[vbptr]] to i32**
-// CHECK: %[[vbtable:.*]] = load i32** %[[vbptr_a:.*]]
+// CHECK: %[[vbtable:.*]] = load i32*, i32** %[[vbptr_a:.*]]
// CHECK: %[[memptr1_shr:.*]] = ashr exact i32 %[[memptr1]], 2
-// CHECK: %[[v7:.*]] = getelementptr inbounds i32* %[[vbtable]], i32 %[[memptr1_shr]]
-// CHECK: %[[vbase_offs:.*]] = load i32* %[[v7]]
-// CHECK: %[[v10:.*]] = getelementptr inbounds i8* %[[vbptr]], i32 %[[vbase_offs]]
-// CHECK: %[[offset:.*]] = getelementptr inbounds i8* %[[v10]], i32 %[[memptr0]]
+// CHECK: %[[v7:.*]] = getelementptr inbounds i32, i32* %[[vbtable]], i32 %[[memptr1_shr]]
+// CHECK: %[[vbase_offs:.*]] = load i32, i32* %[[v7]]
+// CHECK: %[[v10:.*]] = getelementptr inbounds i8, i8* %[[vbptr]], i32 %[[vbase_offs]]
+// CHECK: %[[offset:.*]] = getelementptr inbounds i8, i8* %[[v10]], i32 %[[memptr0]]
// CHECK: %[[v11:.*]] = bitcast i8* %[[offset]] to i32*
-// CHECK: %[[v12:.*]] = load i32* %[[v11]]
+// CHECK: %[[v12:.*]] = load i32, i32* %[[v11]]
// CHECK: ret i32 %[[v12]]
// CHECK: }
@@ -308,8 +308,8 @@ int loadDataMemberPointerUnspecified(Unspecified *o, int Unspecified::*memptr) {
// Test that we can unpack this aggregate member pointer and load the member
// data pointer.
// CHECK: define i32 @"\01?loadDataMemberPointerUnspecified@@YAHPAUUnspecified@@PQ1@H@Z"{{.*}} {
-// CHECK: %[[o:.*]] = load %{{.*}}** %{{.*}}, align 4
-// CHECK: %[[memptr:.*]] = load { i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: %[[o:.*]] = load %{{.*}}*, %{{.*}}** %{{.*}}, align 4
+// CHECK: %[[memptr:.*]] = load { i32, i32, i32 }, { i32, i32, i32 }* %{{.*}}, align 4
// CHECK: %[[memptr0:.*]] = extractvalue { i32, i32, i32 } %[[memptr:.*]], 0
// CHECK: %[[memptr1:.*]] = extractvalue { i32, i32, i32 } %[[memptr:.*]], 1
// CHECK: %[[memptr2:.*]] = extractvalue { i32, i32, i32 } %[[memptr:.*]], 2
@@ -318,19 +318,19 @@ int loadDataMemberPointerUnspecified(Unspecified *o, int Unspecified::*memptr) {
// CHECK: br i1 %[[is_vbase]], label %[[vadjust:.*]], label %[[skip:.*]]
//
// CHECK: [[vadjust]]
-// CHECK: %[[vbptr:.*]] = getelementptr inbounds i8* %[[base]], i32 %[[memptr1]]
+// CHECK: %[[vbptr:.*]] = getelementptr inbounds i8, i8* %[[base]], i32 %[[memptr1]]
// CHECK: %[[vbptr_a:.*]] = bitcast i8* %[[vbptr]] to i32**
-// CHECK: %[[vbtable:.*]] = load i32** %[[vbptr_a:.*]]
+// CHECK: %[[vbtable:.*]] = load i32*, i32** %[[vbptr_a:.*]]
// CHECK: %[[memptr2_shr:.*]] = ashr exact i32 %[[memptr2]], 2
-// CHECK: %[[v7:.*]] = getelementptr inbounds i32* %[[vbtable]], i32 %[[memptr2_shr]]
-// CHECK: %[[vbase_offs:.*]] = load i32* %[[v7]]
-// CHECK: %[[base_adj:.*]] = getelementptr inbounds i8* %[[vbptr]], i32 %[[vbase_offs]]
+// CHECK: %[[v7:.*]] = getelementptr inbounds i32, i32* %[[vbtable]], i32 %[[memptr2_shr]]
+// CHECK: %[[vbase_offs:.*]] = load i32, i32* %[[v7]]
+// CHECK: %[[base_adj:.*]] = getelementptr inbounds i8, i8* %[[vbptr]], i32 %[[vbase_offs]]
//
// CHECK: [[skip]]
// CHECK: %[[new_base:.*]] = phi i8* [ %[[base]], %{{.*}} ], [ %[[base_adj]], %[[vadjust]] ]
-// CHECK: %[[offset:.*]] = getelementptr inbounds i8* %[[new_base]], i32 %[[memptr0]]
+// CHECK: %[[offset:.*]] = getelementptr inbounds i8, i8* %[[new_base]], i32 %[[memptr0]]
// CHECK: %[[v11:.*]] = bitcast i8* %[[offset]] to i32*
-// CHECK: %[[v12:.*]] = load i32* %[[v11]]
+// CHECK: %[[v12:.*]] = load i32, i32* %[[v11]]
// CHECK: ret i32 %[[v12]]
// CHECK: }
}
@@ -354,7 +354,7 @@ void callMemberPointerMultiple(Multiple *o, void (Multiple::*memptr)()) {
// CHECK: define void @"\01?callMemberPointerMultiple@@{{.*}} {
// CHECK: %[[memptr0:.*]] = extractvalue { i8*, i32 } %{{.*}}, 0
// CHECK: %[[memptr1:.*]] = extractvalue { i8*, i32 } %{{.*}}, 1
-// CHECK: %[[this_adjusted:.*]] = getelementptr inbounds i8* %{{.*}}, i32 %[[memptr1]]
+// CHECK: %[[this_adjusted:.*]] = getelementptr inbounds i8, i8* %{{.*}}, i32 %[[memptr1]]
// CHECK: %[[this:.*]] = bitcast i8* %[[this_adjusted]] to {{.*}}
// CHECK: %[[fptr:.*]] = bitcast i8* %[[memptr0]] to {{.*}}
// CHECK: call x86_thiscallcc void %[[fptr]](%{{.*}} %[[this]])
@@ -369,14 +369,14 @@ void callMemberPointerVirtualBase(Virtual *o, void (Virtual::*memptr)()) {
// CHECK: %[[memptr0:.*]] = extractvalue { i8*, i32, i32 } %{{.*}}, 0
// CHECK: %[[memptr1:.*]] = extractvalue { i8*, i32, i32 } %{{.*}}, 1
// CHECK: %[[memptr2:.*]] = extractvalue { i8*, i32, i32 } %{{.*}}, 2
-// CHECK: %[[vbptr:.*]] = getelementptr inbounds i8* %{{.*}}, i32 0
+// CHECK: %[[vbptr:.*]] = getelementptr inbounds i8, i8* %{{.*}}, i32 0
// CHECK: %[[vbptr_a:.*]] = bitcast i8* %[[vbptr]] to i32**
-// CHECK: %[[vbtable:.*]] = load i32** %[[vbptr_a:.*]]
+// CHECK: %[[vbtable:.*]] = load i32*, i32** %[[vbptr_a:.*]]
// CHECK: %[[memptr2_shr:.*]] = ashr exact i32 %[[memptr2]], 2
-// CHECK: %[[v7:.*]] = getelementptr inbounds i32* %[[vbtable]], i32 %[[memptr2_shr]]
-// CHECK: %[[vbase_offs:.*]] = load i32* %[[v7]]
-// CHECK: %[[v10:.*]] = getelementptr inbounds i8* %[[vbptr]], i32 %[[vbase_offs]]
-// CHECK: %[[this_adjusted:.*]] = getelementptr inbounds i8* %[[v10]], i32 %[[memptr1]]
+// CHECK: %[[v7:.*]] = getelementptr inbounds i32, i32* %[[vbtable]], i32 %[[memptr2_shr]]
+// CHECK: %[[vbase_offs:.*]] = load i32, i32* %[[v7]]
+// CHECK: %[[v10:.*]] = getelementptr inbounds i8, i8* %[[vbptr]], i32 %[[vbase_offs]]
+// CHECK: %[[this_adjusted:.*]] = getelementptr inbounds i8, i8* %[[v10]], i32 %[[memptr1]]
// CHECK: %[[fptr:.*]] = bitcast i8* %[[memptr0]] to void ({{.*}})
// CHECK: %[[this:.*]] = bitcast i8* %[[this_adjusted]] to {{.*}}
// CHECK: call x86_thiscallcc void %[[fptr]](%{{.*}} %[[this]])
@@ -485,7 +485,7 @@ void (Multiple::*convertB2FuncToMultiple(void (B2::*mp)()))() {
return mp;
// CHECK: define i64 @"\01?convertB2FuncToMultiple@@YAP8Multiple@@AEXXZP8B2@@AEXXZ@Z"{{.*}} {
// CHECK: store
-// CHECK: %[[mp:.*]] = load i8** %{{.*}}, align 4
+// CHECK: %[[mp:.*]] = load i8*, i8** %{{.*}}, align 4
// CHECK: icmp ne i8* %[[mp]], null
// CHECK: br i1 %{{.*}} label %{{.*}}, label %{{.*}}
//
@@ -509,7 +509,7 @@ void (B2::*convertMultipleFuncToB2(void (Multiple::*mp)()))() {
//
// CHECK: define i32 @"\01?convertMultipleFuncToB2@@YAP8B2@@AEXXZP8Multiple@@AEXXZ@Z"{{.*}} {
// CHECK: store
-// CHECK: %[[src:.*]] = load { i8*, i32 }* %{{.*}}, align 8
+// CHECK: %[[src:.*]] = load { i8*, i32 }, { i8*, i32 }* %{{.*}}, align 4
// CHECK: extractvalue { i8*, i32 } %[[src]], 0
// CHECK: icmp ne i8* %{{.*}}, null
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
@@ -534,7 +534,7 @@ void (D::*convertCToD(void (C::*mp)()))() {
return mp;
// CHECK: define void @"\01?convertCToD@Test1@@YAP8D@1@AEXXZP8C@1@AEXXZ@Z"{{.*}} {
// CHECK: store
-// CHECK: load { i8*, i32, i32 }* %{{.*}}, align 8
+// CHECK: load { i8*, i32, i32 }, { i8*, i32, i32 }* %{{.*}}, align 4
// CHECK: extractvalue { i8*, i32, i32 } %{{.*}}, 0
// CHECK: icmp ne i8* %{{.*}}, null
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
@@ -577,7 +577,7 @@ int A::*reinterpret(int B::*mp) {
int A::*reinterpret(int C::*mp) {
return reinterpret_cast<int A::*>(mp);
// CHECK: define i32 @"\01?reinterpret@Test2@@YAPQA@1@HPQC@1@H@Z"{{.*}} {
-// CHECK: %[[mp:.*]] = load i32*
+// CHECK: %[[mp:.*]] = load i32, i32*
// CHECK: %[[cmp:.*]] = icmp ne i32 %[[mp]], 0
// CHECK: select i1 %[[cmp]], i32 %[[mp]], i32 -1
// CHECK: }
@@ -596,10 +596,10 @@ struct A {
int *load_data(A *a, int A::*mp) {
return &(a->*mp);
// CHECK-LABEL: define i32* @"\01?load_data@Test3@@YAPAHPAUA@1@PQ21@H@Z"{{.*}} {
-// CHECK: %[[a:.*]] = load %"struct.Test3::A"** %{{.*}}, align 4
-// CHECK: %[[mp:.*]] = load i32* %{{.*}}, align 4
+// CHECK: %[[a:.*]] = load %"struct.Test3::A"*, %"struct.Test3::A"** %{{.*}}, align 4
+// CHECK: %[[mp:.*]] = load i32, i32* %{{.*}}, align 4
// CHECK: %[[a_i8:.*]] = bitcast %"struct.Test3::A"* %[[a]] to i8*
-// CHECK: getelementptr inbounds i8* %[[a_i8]], i32 %[[mp]]
+// CHECK: getelementptr inbounds i8, i8* %[[a_i8]], i32 %[[mp]]
// CHECK: }
}
@@ -618,12 +618,12 @@ void (C::*getmp())() {
// CHECK: store { i8*, i32 } { i8* bitcast (void (%"struct.Test4::C"*, ...)* @"\01??_9C@Test4@@$BA@AE" to i8*), i32 4 }, { i8*, i32 }* %{{.*}}
//
-// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@Test4@@$BA@AE"(%"struct.Test4::C"* %this, ...)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@Test4@@$BA@AE"(%"struct.Test4::C"* %this, ...) {{.*}} comdat
// CHECK-NOT: getelementptr
-// CHECK: load void (%"struct.Test4::C"*, ...)*** %{{.*}}
-// CHECK: getelementptr inbounds void (%"struct.Test4::C"*, ...)** %{{.*}}, i64 0
+// CHECK: load void (%"struct.Test4::C"*, ...)**, void (%"struct.Test4::C"*, ...)*** %{{.*}}
+// CHECK: getelementptr inbounds void (%"struct.Test4::C"*, ...)*, void (%"struct.Test4::C"*, ...)** %{{.*}}, i64 0
// CHECK-NOT: getelementptr
-// CHECK: musttail call x86_thiscallcc void (%"struct.Test4::C"*, ...)* %
+// CHECK: musttail call x86_thiscallcc void (%"struct.Test4::C"*, ...) %
}