[llvm] 97c151d - [MemCpyOpt] Fix broken check lines (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 05:39:58 PST 2022
Author: Nikita Popov
Date: 2022-02-16T14:39:43+01:00
New Revision: 97c151de3de0266b896bb01e98b005fb31f6d3cd
URL: https://github.com/llvm/llvm-project/commit/97c151de3de0266b896bb01e98b005fb31f6d3cd
DIFF: https://github.com/llvm/llvm-project/commit/97c151de3de0266b896bb01e98b005fb31f6d3cd.diff
LOG: [MemCpyOpt] Fix broken check lines (NFC)
These are leftovers from when there were separate MSSA/non-MSSA
check lines.
Added:
Modified:
llvm/test/Transforms/MemCpyOpt/memcpy.ll
llvm/test/Transforms/MemCpyOpt/stackrestore.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/MemCpyOpt/memcpy.ll b/llvm/test/Transforms/MemCpyOpt/memcpy.ll
index 2b2ba552f0d4..4881f110ab03 100644
--- a/llvm/test/Transforms/MemCpyOpt/memcpy.ll
+++ b/llvm/test/Transforms/MemCpyOpt/memcpy.ll
@@ -207,21 +207,13 @@ define void @test4_write_between(i8 *%P) {
}
define i8 @test4_read_between(i8 *%P) {
-; NO_MSSA-LABEL: @test4_read_between(
-; NO_MSSA-NEXT: [[A1:%.*]] = alloca [[TMP1:%.*]], align 8
-; NO_MSSA-NEXT: [[A2:%.*]] = bitcast %1* [[A1]] to i8*
-; NO_MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[A2]], i8* align 4 [[P:%.*]], i64 8, i1 false)
-; NO_MSSA-NEXT: [[X:%.*]] = load i8, i8* [[A2]], align 1
-; NO_MSSA-NEXT: call void @test4a(i8* byval align 1 [[A2]])
-; NO_MSSA-NEXT: ret i8 [[X]]
-;
-; MSSA-LABEL: @test4_read_between(
-; MSSA-NEXT: [[A1:%.*]] = alloca [[TMP1:%.*]], align 8
-; MSSA-NEXT: [[A2:%.*]] = bitcast %1* [[A1]] to i8*
-; MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[A2]], i8* align 4 [[P:%.*]], i64 8, i1 false)
-; MSSA-NEXT: [[X:%.*]] = load i8, i8* [[A2]], align 1
-; MSSA-NEXT: call void @test4a(i8* byval align 1 [[P]])
-; MSSA-NEXT: ret i8 [[X]]
+; CHECK-LABEL: @test4_read_between(
+; CHECK-NEXT: [[A1:%.*]] = alloca [[TMP1:%.*]], align 8
+; CHECK-NEXT: [[A2:%.*]] = bitcast %1* [[A1]] to i8*
+; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[A2]], i8* align 4 [[P:%.*]], i64 8, i1 false)
+; CHECK-NEXT: [[X:%.*]] = load i8, i8* [[A2]], align 1
+; CHECK-NEXT: call void @test4a(i8* byval(i8) align 1 [[P]])
+; CHECK-NEXT: ret i8 [[X]]
;
%a1 = alloca %1
%a2 = bitcast %1* %a1 to i8*
@@ -232,27 +224,16 @@ define i8 @test4_read_between(i8 *%P) {
}
define void @test4_non_local(i8 *%P, i1 %c) {
-; NO_MSSA-LABEL: @test4_non_local(
-; NO_MSSA-NEXT: [[A1:%.*]] = alloca [[TMP1:%.*]], align 8
-; NO_MSSA-NEXT: [[A2:%.*]] = bitcast %1* [[A1]] to i8*
-; NO_MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[A2]], i8* align 4 [[P:%.*]], i64 8, i1 false)
-; NO_MSSA-NEXT: br i1 [[C:%.*]], label [[CALL:%.*]], label [[EXIT:%.*]]
-; NO_MSSA: call:
-; NO_MSSA-NEXT: call void @test4a(i8* byval align 1 [[A2]])
-; NO_MSSA-NEXT: br label [[EXIT]]
-; NO_MSSA: exit:
-; NO_MSSA-NEXT: ret void
-;
-; MSSA-LABEL: @test4_non_local(
-; MSSA-NEXT: [[A1:%.*]] = alloca [[TMP1:%.*]], align 8
-; MSSA-NEXT: [[A2:%.*]] = bitcast %1* [[A1]] to i8*
-; MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[A2]], i8* align 4 [[P:%.*]], i64 8, i1 false)
-; MSSA-NEXT: br i1 [[C:%.*]], label [[CALL:%.*]], label [[EXIT:%.*]]
-; MSSA: call:
-; MSSA-NEXT: call void @test4a(i8* byval align 1 [[P]])
-; MSSA-NEXT: br label [[EXIT]]
-; MSSA: exit:
-; MSSA-NEXT: ret void
+; CHECK-LABEL: @test4_non_local(
+; CHECK-NEXT: [[A1:%.*]] = alloca [[TMP1:%.*]], align 8
+; CHECK-NEXT: [[A2:%.*]] = bitcast %1* [[A1]] to i8*
+; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[A2]], i8* align 4 [[P:%.*]], i64 8, i1 false)
+; CHECK-NEXT: br i1 [[C:%.*]], label [[CALL:%.*]], label [[EXIT:%.*]]
+; CHECK: call:
+; CHECK-NEXT: call void @test4a(i8* byval(i8) align 1 [[P]])
+; CHECK-NEXT: br label [[EXIT]]
+; CHECK: exit:
+; CHECK-NEXT: ret void
;
%a1 = alloca %1
%a2 = bitcast %1* %a1 to i8*
diff --git a/llvm/test/Transforms/MemCpyOpt/stackrestore.ll b/llvm/test/Transforms/MemCpyOpt/stackrestore.ll
index 86e353b3bf69..2e59431ea858 100644
--- a/llvm/test/Transforms/MemCpyOpt/stackrestore.ll
+++ b/llvm/test/Transforms/MemCpyOpt/stackrestore.ll
@@ -15,33 +15,19 @@ target triple = "i686-unknown-windows-msvc19.14.26433"
; a call to @external.
define i32 @test_norestore(i32 %n) {
-; NO_MSSA-LABEL: @test_norestore(
-; NO_MSSA-NEXT: [[TMPMEM:%.*]] = alloca [10 x i8], align 4
-; NO_MSSA-NEXT: [[TMP:%.*]] = getelementptr inbounds [10 x i8], [10 x i8]* [[TMPMEM]], i32 0, i32 0
-; NO_MSSA-NEXT: [[P:%.*]] = alloca i8, i32 [[N:%.*]], align 4
-; NO_MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[P]], i8* align 1 getelementptr inbounds ([9 x i8], [9 x i8]* @str, i32 0, i32 0), i32 9, i1 false)
-; NO_MSSA-NEXT: [[P10:%.*]] = getelementptr inbounds i8, i8* [[P]], i32 9
-; NO_MSSA-NEXT: store i8 0, i8* [[P10]], align 1
-; NO_MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[TMP]], i8* [[P]], i32 10, i1 false)
-; NO_MSSA-NEXT: call void @external()
-; NO_MSSA-NEXT: [[HEAP:%.*]] = call i8* @malloc(i32 9)
-; NO_MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[HEAP]], i8* [[P]], i32 9, i1 false)
-; NO_MSSA-NEXT: call void @useit(i8* [[HEAP]])
-; NO_MSSA-NEXT: ret i32 0
-;
-; MSSA-LABEL: @test_norestore(
-; MSSA-NEXT: [[TMPMEM:%.*]] = alloca [10 x i8], align 4
-; MSSA-NEXT: [[TMP:%.*]] = getelementptr inbounds [10 x i8], [10 x i8]* [[TMPMEM]], i32 0, i32 0
-; MSSA-NEXT: [[P:%.*]] = alloca i8, i32 [[N:%.*]], align 4
-; MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[P]], i8* align 1 getelementptr inbounds ([9 x i8], [9 x i8]* @str, i32 0, i32 0), i32 9, i1 false)
-; MSSA-NEXT: [[P10:%.*]] = getelementptr inbounds i8, i8* [[P]], i32 9
-; MSSA-NEXT: store i8 0, i8* [[P10]], align 1
-; MSSA-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[TMP]], i8* [[P]], i32 10, i1 false)
-; MSSA-NEXT: call void @external()
-; MSSA-NEXT: [[HEAP:%.*]] = call i8* @malloc(i32 9)
-; MSSA-NEXT: call void @llvm.memmove.p0i8.p0i8.i32(i8* [[HEAP]], i8* align 1 getelementptr inbounds ([9 x i8], [9 x i8]* @str, i32 0, i32 0), i32 9, i1 false)
-; MSSA-NEXT: call void @useit(i8* [[HEAP]])
-; MSSA-NEXT: ret i32 0
+; CHECK-LABEL: @test_norestore(
+; CHECK-NEXT: [[TMPMEM:%.*]] = alloca [10 x i8], align 4
+; CHECK-NEXT: [[TMP:%.*]] = getelementptr inbounds [10 x i8], [10 x i8]* [[TMPMEM]], i32 0, i32 0
+; CHECK-NEXT: [[P:%.*]] = alloca i8, i32 [[N:%.*]], align 4
+; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[P]], i8* align 1 getelementptr inbounds ([9 x i8], [9 x i8]* @str, i32 0, i32 0), i32 9, i1 false)
+; CHECK-NEXT: [[P10:%.*]] = getelementptr inbounds i8, i8* [[P]], i32 9
+; CHECK-NEXT: store i8 0, i8* [[P10]], align 1
+; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[TMP]], i8* [[P]], i32 10, i1 false)
+; CHECK-NEXT: call void @external()
+; CHECK-NEXT: [[HEAP:%.*]] = call i8* @malloc(i32 9)
+; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[HEAP]], i8* align 1 getelementptr inbounds ([9 x i8], [9 x i8]* @str, i32 0, i32 0), i32 9, i1 false)
+; CHECK-NEXT: call void @useit(i8* [[HEAP]])
+; CHECK-NEXT: ret i32 0
;
%tmpmem = alloca [10 x i8], align 4
%tmp = getelementptr inbounds [10 x i8], [10 x i8]* %tmpmem, i32 0, i32 0
More information about the llvm-commits
mailing list