-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[VPlan] Use opaque pointers in VPlan unit test IR #69947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-llvm-transforms Author: None (calebwat) ChangesUpdates the unit tests for VPlan to use opaque pointers in strings containing LLVM IR. This is to match the similar adjustments being made for lit tests to use opaque pointers. Patch is 36.54 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/69947.diff 2 Files Affected:
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
index 5381fa461e9c992..89fbe0306946189 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
@@ -21,15 +21,15 @@ class VPlanHCFGTest : public VPlanTestBase {};
TEST_F(VPlanHCFGTest, testBuildHCFGInnerLoop) {
const char *ModuleString =
- "define void @f(i32* %A, i64 %N) {\n"
+ "define void @f(ptr %A, i64 %N) {\n"
"entry:\n"
" br label %for.body\n"
"for.body:\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %arr.idx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv\n"
- " %l1 = load i32, i32* %arr.idx, align 4\n"
+ " %arr.idx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv\n"
+ " %l1 = load i32, ptr %arr.idx, align 4\n"
" %res = add i32 %l1, 10\n"
- " store i32 %res, i32* %arr.idx, align 4\n"
+ " store i32 %res, ptr %arr.idx, align 4\n"
" %indvars.iv.next = add i64 %indvars.iv, 1\n"
" %exitcond = icmp ne i64 %indvars.iv.next, %N\n"
" br i1 %exitcond, label %for.body, label %for.end\n"
@@ -148,15 +148,15 @@ compound=true
TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
const char *ModuleString =
- "define void @f(i32* %A, i64 %N) {\n"
+ "define void @f(ptr %A, i64 %N) {\n"
"entry:\n"
" br label %for.body\n"
"for.body:\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %arr.idx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv\n"
- " %l1 = load i32, i32* %arr.idx, align 4\n"
+ " %arr.idx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv\n"
+ " %l1 = load i32, ptr %arr.idx, align 4\n"
" %res = add i32 %l1, 10\n"
- " store i32 %res, i32* %arr.idx, align 4\n"
+ " store i32 %res, ptr %arr.idx, align 4\n"
" %indvars.iv.next = add i64 %indvars.iv, 1\n"
" %exitcond = icmp ne i64 %indvars.iv.next, %N\n"
" br i1 %exitcond, label %for.body, label %for.end\n"
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanSlpTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanSlpTest.cpp
index 70951f3a656a0b5..396919763c933a3 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanSlpTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanSlpTest.cpp
@@ -56,33 +56,33 @@ TEST_F(VPlanSlpTest, testSlpSimple_2) {
"%struct.Test = type { i32, i32 }\n"
"%struct.Test3 = type { i32, i32, i32 }\n"
"%struct.Test4xi8 = type { i8, i8, i8 }\n"
- "define void @add_x2(%struct.Test* nocapture readonly %A, %struct.Test* "
- "nocapture readonly %B, %struct.Test* nocapture %C) {\n"
+ "define void @add_x2(ptr nocapture readonly %A, ptr "
+ "nocapture readonly %B, ptr nocapture %C) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A0 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A0 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 0\n"
- " %vA0 = load i32, i32* %A0, align 4\n"
- " %B0 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA0 = load i32, ptr %A0, align 4\n"
+ " %B0 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 0\n"
- " %vB0 = load i32, i32* %B0, align 4\n"
+ " %vB0 = load i32, ptr %B0, align 4\n"
" %add0 = add nsw i32 %vA0, %vB0\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
- " %B1 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA1 = load i32, ptr %A1, align 4\n"
+ " %B1 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 1\n"
- " %vB1 = load i32, i32* %B1, align 4\n"
+ " %vB1 = load i32, ptr %B1, align 4\n"
" %add1 = add nsw i32 %vA1, %vB1\n"
- " %C0 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C0 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 0\n"
- " store i32 %add0, i32* %C0, align 4\n"
- " %C1 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " store i32 %add0, ptr %C0, align 4\n"
+ " %C1 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 1\n"
- " store i32 %add1, i32* %C1, align 4\n"
+ " store i32 %add1, ptr %C1, align 4\n"
" %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n"
" %exitcond = icmp eq i64 %indvars.iv.next, 1024\n"
" br i1 %exitcond, label %for.cond.cleanup, label %for.body\n"
@@ -129,33 +129,33 @@ TEST_F(VPlanSlpTest, testSlpSimple_3) {
"%struct.Test = type { i32, i32 }\n"
"%struct.Test3 = type { i32, i32, i32 }\n"
"%struct.Test4xi8 = type { i8, i8, i8 }\n"
- "define void @add_x2(%struct.Test* nocapture readonly %A, %struct.Test* "
- "nocapture readonly %B, %struct.Test* nocapture %C) {\n"
+ "define void @add_x2(ptr nocapture readonly %A, ptr "
+ "nocapture readonly %B, ptr nocapture %C) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A0 = getelementptr %struct.Test, %struct.Test* %A, i64 "
+ " %A0 = getelementptr %struct.Test, ptr %A, i64 "
" %indvars.iv, i32 0\n"
- " %vA0 = load i32, i32* %A0, align 4\n"
- " %B0 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA0 = load i32, ptr %A0, align 4\n"
+ " %B0 = getelementptr inbounds %struct.Test, ptr %B, i64 "
" %indvars.iv, i32 0\n"
- " %vB0 = load i32, i32* %B0, align 4\n"
+ " %vB0 = load i32, ptr %B0, align 4\n"
" %add0 = add nsw i32 %vA0, %vB0\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
" %indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
- " %B1 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA1 = load i32, ptr %A1, align 4\n"
+ " %B1 = getelementptr inbounds %struct.Test, ptr %B, i64 "
" %indvars.iv, i32 1\n"
- " %vB1 = load i32, i32* %B1, align 4\n"
+ " %vB1 = load i32, ptr %B1, align 4\n"
" %add1 = add nsw i32 %vA1, %vB1\n"
- " %C0 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C0 = getelementptr inbounds %struct.Test, ptr %C, i64 "
" %indvars.iv, i32 0\n"
- " store i32 %add0, i32* %C0, align 4\n"
- " %C1 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " store i32 %add0, ptr %C0, align 4\n"
+ " %C1 = getelementptr inbounds %struct.Test, ptr %C, i64 "
" %indvars.iv, i32 1\n"
- " store i32 %add1, i32* %C1, align 4\n"
+ " store i32 %add1, ptr %C1, align 4\n"
" %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n"
" %exitcond = icmp eq i64 %indvars.iv.next, 1024\n"
" br i1 %exitcond, label %for.cond.cleanup, label %for.body\n"
@@ -206,27 +206,27 @@ TEST_F(VPlanSlpTest, testSlpSimple_3) {
TEST_F(VPlanSlpTest, testSlpReuse_1) {
const char *ModuleString =
"%struct.Test = type { i32, i32 }\n"
- "define void @add_x2(%struct.Test* nocapture readonly %A, %struct.Test* "
- "nocapture readonly %B, %struct.Test* nocapture %C) {\n"
+ "define void @add_x2(ptr nocapture readonly %A, ptr "
+ "nocapture readonly %B, ptr nocapture %C) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A0 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A0 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 0\n"
- " %vA0 = load i32, i32* %A0, align 4\n"
+ " %vA0 = load i32, ptr %A0, align 4\n"
" %add0 = add nsw i32 %vA0, %vA0\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
+ " %vA1 = load i32, ptr %A1, align 4\n"
" %add1 = add nsw i32 %vA1, %vA1\n"
- " %C0 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C0 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 0\n"
- " store i32 %add0, i32* %C0, align 4\n"
- " %C1 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " store i32 %add0, ptr %C0, align 4\n"
+ " %C1 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 1\n"
- " store i32 %add1, i32* %C1, align 4\n"
+ " store i32 %add1, ptr %C1, align 4\n"
" %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n"
" %exitcond = icmp eq i64 %indvars.iv.next, 1024\n"
" br i1 %exitcond, label %for.cond.cleanup, label %for.body\n"
@@ -269,27 +269,27 @@ TEST_F(VPlanSlpTest, testSlpReuse_1) {
TEST_F(VPlanSlpTest, testSlpReuse_2) {
const char *ModuleString =
"%struct.Test = type { i32, i32 }\n"
- "define void @add_x2(%struct.Test* nocapture readonly %A, %struct.Test* "
- "nocapture readonly %B, %struct.Test* nocapture %C) {\n"
+ "define void @add_x2(ptr nocapture readonly %A, ptr "
+ "nocapture readonly %B, ptr nocapture %C) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A0 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A0 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 0\n"
- " %vA0 = load i32, i32* %A0, align 4\n"
+ " %vA0 = load i32, ptr %A0, align 4\n"
" %add0 = add nsw i32 %vA0, %vA0\n"
- " %C0 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C0 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 0\n"
- " store i32 %add0, i32* %C0, align 4\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " store i32 %add0, ptr %C0, align 4\n"
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
+ " %vA1 = load i32, ptr %A1, align 4\n"
" %add1 = add nsw i32 %vA1, %vA1\n"
- " %C1 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C1 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 1\n"
- " store i32 %add1, i32* %C1, align 4\n"
+ " store i32 %add1, ptr %C1, align 4\n"
" %use = add i32 %vA1, 1\n"
" %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n"
" %exitcond = icmp eq i64 %indvars.iv.next, 1024\n"
@@ -386,49 +386,49 @@ TEST_F(VPlanSlpTest, testSlpReorder_1) {
LLVMContext Ctx;
const char *ModuleString =
"%struct.Test = type { i32, i32 }\n"
- "define void @add_x3(%struct.Test* %A, %struct.Test* %B, %struct.Test* "
- "%C, %struct.Test* %D, %struct.Test* %E) {\n"
+ "define void @add_x3(ptr %A, ptr %B, ptr "
+ "%C, ptr %D, ptr %E) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A0 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A0 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 0\n"
- " %vA0 = load i32, i32* %A0, align 4\n"
- " %B0 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA0 = load i32, ptr %A0, align 4\n"
+ " %B0 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 0\n"
- " %vB0 = load i32, i32* %B0, align 4\n"
+ " %vB0 = load i32, ptr %B0, align 4\n"
" %mul11 = mul nsw i32 %vA0, %vB0\n"
- " %C0 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C0 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 0\n"
- " %vC0 = load i32, i32* %C0, align 4\n"
- " %D0 = getelementptr inbounds %struct.Test, %struct.Test* %D, i64 "
+ " %vC0 = load i32, ptr %C0, align 4\n"
+ " %D0 = getelementptr inbounds %struct.Test, ptr %D, i64 "
"%indvars.iv, i32 0\n"
- " %vD0 = load i32, i32* %D0, align 4\n"
+ " %vD0 = load i32, ptr %D0, align 4\n"
" %mul12 = mul nsw i32 %vC0, %vD0\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
- " %B1 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA1 = load i32, ptr %A1, align 4\n"
+ " %B1 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 1\n"
- " %vB1 = load i32, i32* %B1, align 4\n"
+ " %vB1 = load i32, ptr %B1, align 4\n"
" %mul21 = mul nsw i32 %vA1, %vB1\n"
- " %C1 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C1 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 1\n"
- " %vC1 = load i32, i32* %C1, align 4\n"
- " %D1 = getelementptr inbounds %struct.Test, %struct.Test* %D, i64 "
+ " %vC1 = load i32, ptr %C1, align 4\n"
+ " %D1 = getelementptr inbounds %struct.Test, ptr %D, i64 "
"%indvars.iv, i32 1\n"
- " %vD1 = load i32, i32* %D1, align 4\n"
+ " %vD1 = load i32, ptr %D1, align 4\n"
" %mul22 = mul nsw i32 %vC1, %vD1\n"
" %add1 = add nsw i32 %mul11, %mul12\n"
" %add2 = add nsw i32 %mul22, %mul21\n"
- " %E0 = getelementptr inbounds %struct.Test, %struct.Test* %E, i64 "
+ " %E0 = getelementptr inbounds %struct.Test, ptr %E, i64 "
"%indvars.iv, i32 0\n"
- " store i32 %add1, i32* %E0, align 4\n"
- " %E1 = getelementptr inbounds %struct.Test, %struct.Test* %E, i64 "
+ " store i32 %add1, ptr %E0, align 4\n"
+ " %E1 = getelementptr inbounds %struct.Test, ptr %E, i64 "
"%indvars.iv, i32 1\n"
- " store i32 %add2, i32* %E1, align 4\n"
+ " store i32 %add2, ptr %E1, align 4\n"
" %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n"
" %exitcond = icmp eq i64 %indvars.iv.next, 1024\n"
" br i1 %exitcond, label %for.cond.cleanup, label %for.body\n"
@@ -458,49 +458,49 @@ TEST_F(VPlanSlpTest, testSlpReorder_2) {
LLVMContext Ctx;
const char *ModuleString =
"%struct.Test = type { i32, i32 }\n"
- "define void @add_x3(%struct.Test* %A, %struct.Test* %B, %struct.Test* "
- "%C, %struct.Test* %D, %struct.Test* %E) {\n"
+ "define void @add_x3(ptr %A, ptr %B, ptr "
+ "%C, ptr %D, ptr %E) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A0 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A0 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 0\n"
- " %vA0 = load i32, i32* %A0, align 4\n"
- " %B0 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA0 = load i32, ptr %A0, align 4\n"
+ " %B0 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 0\n"
- " %vB0 = load i32, i32* %B0, align 4\n"
+ " %vB0 = load i32, ptr %B0, align 4\n"
" %mul11 = mul nsw i32 %vA0, %vB0\n"
- " %C0 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C0 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 0\n"
- " %vC0 = load i32, i32* %C0, align 4\n"
- " %D0 = getelementptr inbounds %struct.Test, %struct.Test* %D, i64 "
+ " %vC0 = load i32, ptr %C0, align 4\n"
+ " %D0 = getelementptr inbounds %struct.Test, ptr %D, i64 "
"%indvars.iv, i32 0\n"
- " %vD0 = load i32, i32* %D0, align 4\n"
+ " %vD0 = load i32, ptr %D0, align 4\n"
" %mul12 = mul nsw i32 %vC0, %vD0\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
- " %B1 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA1 = load i32, ptr %A1, align 4\n"
+ " %B1 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 1\n"
- " %vB1 = load i32, i32* %B1, align 4\n"
+ " %vB1 = load i32, ptr %B1, align 4\n"
" %mul21 = mul nsw i32 %vB1, %vA1\n"
- " %C1 = getelementptr inbounds %struct.Test, %struct.Test* %C, i64 "
+ " %C1 = getelementptr inbounds %struct.Test, ptr %C, i64 "
"%indvars.iv, i32 1\n"
- " %vC1 = load i32, i32* %C1, align 4\n"
- " %D1 = getelementptr inbounds %struct.Test, %struct.Test* %D, i64 "
+ " %vC1 = load i32, ptr %C1, align 4\n"
+ " %D1 = getelementptr inbounds %struct.Test, ptr %D, i64 "
"%indvars.iv, i32 1\n"
- " %vD1 = load i32, i32* %D1, align 4\n"
+ " %vD1 = load i32, ptr %D1, align 4\n"
" %mul22 = mul nsw i32 %vD1, %vC1\n"
" %add1 = add nsw i32 %mul11, %mul12\n"
" %add2 = add nsw i32 %mul22, %mul21\n"
- " %E0 = getelementptr inbounds %struct.Test, %struct.Test* %E, i64 "
+ " %E0 = getelementptr inbounds %struct.Test, ptr %E, i64 "
"%indvars.iv, i32 0\n"
- " store i32 %add1, i32* %E0, align 4\n"
- " %E1 = getelementptr inbounds %struct.Test, %struct.Test* %E, i64 "
+ " store i32 %add1, ptr %E0, align 4\n"
+ " %E1 = getelementptr inbounds %struct.Test, ptr %E, i64 "
"%indvars.iv, i32 1\n"
- " store i32 %add2, i32* %E1, align 4\n"
+ " store i32 %add2, ptr %E1, align 4\n"
" %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n"
" %exitcond = icmp eq i64 %indvars.iv.next, 1024\n"
" br i1 %exitcond, label %for.cond.cleanup, label %for.body\n"
@@ -530,49 +530,49 @@ TEST_F(VPlanSlpTest, testSlpReorder_3) {
LLVMContext Ctx;
const char *ModuleString =
"%struct.Test = type { i32, i32 }\n"
- "define void @add_x3(%struct.Test* %A, %struct.Test* %B, %struct.Test* "
- "%C, %struct.Test* %D, %struct.Test* %E) {\n"
+ "define void @add_x3(ptr %A, ptr %B, ptr "
+ "%C, ptr %D, ptr %E) {\n"
"entry:\n"
" br label %for.body\n"
"for.body: ; preds = %for.body, "
"%entry\n"
" %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n"
- " %A1 = getelementptr inbounds %struct.Test, %struct.Test* %A, i64 "
+ " %A1 = getelementptr inbounds %struct.Test, ptr %A, i64 "
"%indvars.iv, i32 1\n"
- " %vA1 = load i32, i32* %A1, align 4\n"
- " %B0 = getelementptr inbounds %struct.Test, %struct.Test* %B, i64 "
+ " %vA1 = load i32, ptr %A1, align 4\n"
+ " %B0 = getelementptr inbounds %struct.Test, ptr %B, i64 "
"%indvars.iv, i32 0\n"
- " %vB0 = load i32, i32* %B0, align 4\n"
+ " %vB0 = load i32, ptr %B0, align 4\n...
[truncated]
|
Updates the unit tests for VPlan to use opaque pointers in strings containing LLVM IR. This is to match the similar adjustments being made for lit tests to use opaque pointers.
2ef240e
to
5509e59
Compare
@fhahn When you have a moment, could you review this please? It's a test-only, nonfunctional change to switch uses of non-opaque pointers to opaque pointers in a couple files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Updates the unit tests for VPlan to use opaque pointers in strings containing LLVM IR. This is to match the similar adjustments being made for lit tests to use opaque pointers.