[llvm] df0b1df - [test][MemCpyOpt] Update D153453 test
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 23:05:46 PDT 2023
Author: Vitaly Buka
Date: 2023-08-02T23:05:32-07:00
New Revision: df0b1df99c9ccf110482661678321e596566c725
URL: https://github.com/llvm/llvm-project/commit/df0b1df99c9ccf110482661678321e596566c725
DIFF: https://github.com/llvm/llvm-project/commit/df0b1df99c9ccf110482661678321e596566c725.diff
LOG: [test][MemCpyOpt] Update D153453 test
Added:
Modified:
llvm/test/Transforms/MemCpyOpt/lifetime-missing.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/MemCpyOpt/lifetime-missing.ll b/llvm/test/Transforms/MemCpyOpt/lifetime-missing.ll
index dfc3c7489b8b26..64ef043ca94c7c 100644
--- a/llvm/test/Transforms/MemCpyOpt/lifetime-missing.ll
+++ b/llvm/test/Transforms/MemCpyOpt/lifetime-missing.ll
@@ -9,27 +9,30 @@ target triple = "x86_64-grtev4-linux-gnu"
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0
-define void @test(ptr %agg.tmp3.sroa.35.128.sroa_idx) {
-; CHECK-LABEL: define void @test
-; CHECK-SAME: (ptr [[AGG_TMP3_SROA_35_128_SROA_IDX:%.*]]) {
+define void @test() {
+; CHECK-LABEL: define void @test() {
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[AGG_TMP3_SROA_351:%.*]] = alloca [20 x i8], align 4
+; CHECK-NEXT: [[AGG_TMP3_SROA_35:%.*]] = alloca [20 x i8], align 4
; CHECK-NEXT: [[AGG_TMP_SROA_14:%.*]] = alloca [20 x i8], align 4
; CHECK-NEXT: [[AGG_TMP_SROA_14_128_SROA_IDX:%.*]] = getelementptr i8, ptr [[AGG_TMP_SROA_14]], i64 4
-; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr [[AGG_TMP_SROA_14]], ptr null, i64 1, i1 false)
-; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 20, ptr [[AGG_TMP3_SROA_351]])
-; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr [[AGG_TMP3_SROA_351]], ptr [[AGG_TMP_SROA_14]], i64 20, i1 false)
-; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr null, ptr [[AGG_TMP3_SROA_35_128_SROA_IDX]], i64 0, i1 false)
+; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr [[AGG_TMP_SROA_14_128_SROA_IDX]], ptr null, i64 1, i1 false)
+; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 20, ptr [[AGG_TMP3_SROA_35]])
+; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr [[AGG_TMP3_SROA_35]], ptr [[AGG_TMP_SROA_14]], i64 20, i1 false)
+; CHECK-NEXT: [[AGG_TMP3_SROA_35_128_SROA_IDX:%.*]] = getelementptr i8, ptr [[AGG_TMP3_SROA_35]], i64 4
+; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr inttoptr (i64 4 to ptr), ptr [[AGG_TMP3_SROA_35_128_SROA_IDX]], i64 1, i1 false)
+; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr null, ptr [[AGG_TMP3_SROA_35_128_SROA_IDX]], i64 1, i1 false)
; CHECK-NEXT: ret void
;
entry:
- %agg.tmp3.sroa.351 = alloca [20 x i8], align 4
+ %agg.tmp3.sroa.35 = alloca [20 x i8], align 4
%agg.tmp.sroa.14 = alloca [20 x i8], align 4
%agg.tmp.sroa.14.128.sroa_idx = getelementptr i8, ptr %agg.tmp.sroa.14, i64 4
- call void @llvm.memcpy.p0.p0.i64(ptr %agg.tmp.sroa.14, ptr null, i64 1, i1 false)
- call void @llvm.lifetime.start.p0(i64 20, ptr %agg.tmp3.sroa.351)
- call void @llvm.memcpy.p0.p0.i64(ptr %agg.tmp3.sroa.351, ptr %agg.tmp.sroa.14, i64 20, i1 false)
- call void @llvm.memcpy.p0.p0.i64(ptr null, ptr %agg.tmp3.sroa.35.128.sroa_idx, i64 0, i1 false)
+ call void @llvm.memcpy.p0.p0.i64(ptr %agg.tmp.sroa.14.128.sroa_idx, ptr null, i64 1, i1 false)
+ call void @llvm.lifetime.start.p0(i64 20, ptr %agg.tmp3.sroa.35)
+ call void @llvm.memcpy.p0.p0.i64(ptr %agg.tmp3.sroa.35, ptr %agg.tmp.sroa.14, i64 20, i1 false)
+ %agg.tmp3.sroa.35.128.sroa_idx = getelementptr i8, ptr %agg.tmp3.sroa.35, i64 4
+ call void @llvm.memcpy.p0.p0.i64(ptr inttoptr (i64 4 to ptr), ptr %agg.tmp3.sroa.35.128.sroa_idx, i64 1, i1 false)
+ call void @llvm.memcpy.p0.p0.i64(ptr null, ptr inttoptr (i64 4 to ptr), i64 1, i1 false)
ret void
}
@@ -37,7 +40,8 @@ entry:
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1
; uselistorder directives
-uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 }
+uselistorder i64 4, { 2, 0, 1 }
+uselistorder ptr @llvm.memcpy.p0.p0.i64, { 3, 2, 1, 0 }
attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
More information about the llvm-commits
mailing list