File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
test/Transforms/DeadStoreElimination Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1213,7 +1213,8 @@ struct DSEState {
12131213
12141214 auto I = InvisibleToCallerAfterRet.insert ({V, false });
12151215 if (I.second && isInvisibleToCallerOnUnwind (V) && isNoAliasCall (V))
1216- I.first ->second = !PointerMayBeCaptured (V, /* ReturnCaptures=*/ true );
1216+ I.first ->second = capturesNothing (PointerMayBeCaptured (
1217+ V, /* ReturnCaptures=*/ true , CaptureComponents::Provenance));
12171218 return I.first ->second ;
12181219 }
12191220
@@ -1230,7 +1231,8 @@ struct DSEState {
12301231 // with the killing MemoryDef. But we refrain from doing so for now to
12311232 // limit compile-time and this does not cause any changes to the number
12321233 // of stores removed on a large test set in practice.
1233- I.first ->second = PointerMayBeCaptured (V, /* ReturnCaptures=*/ false );
1234+ I.first ->second = capturesAnything (PointerMayBeCaptured (
1235+ V, /* ReturnCaptures=*/ false , CaptureComponents::Provenance));
12341236 return !I.first ->second ;
12351237 }
12361238
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ define void @f() {
88; CHECK-NEXT: [[TMP1:%.*]] = call noalias ptr @_Znwm(i64 32)
99; CHECK-NEXT: [[TMP2:%.*]] = icmp ugt ptr [[TMP1]], @global
1010; CHECK-NEXT: call void @llvm.assume(i1 [[TMP2]])
11- ; CHECK-NEXT: store i8 0, ptr [[TMP1]], align 1
1211; CHECK-NEXT: ret void
1312;
1413 %tmp1 = call noalias ptr @_Znwm (i64 32 )
@@ -23,7 +22,6 @@ define void @f2() {
2322; CHECK-NEXT: [[TMP1:%.*]] = call noalias ptr @_Znwm(i64 32)
2423; CHECK-NEXT: [[TMP2:%.*]] = icmp ugt ptr [[TMP1]], @global
2524; CHECK-NEXT: call void @llvm.assume(i1 [[TMP2]])
26- ; CHECK-NEXT: store i8 0, ptr [[TMP1]], align 1
2725; CHECK-NEXT: call void @quux(ptr @global)
2826; CHECK-NEXT: ret void
2927;
Original file line number Diff line number Diff line change @@ -322,7 +322,6 @@ define void @malloc_address_only_escape() {
322322; CHECK-LABEL: @malloc_address_only_escape(
323323; CHECK-NEXT: [[M:%.*]] = call ptr @malloc(i64 24)
324324; CHECK-NEXT: call void @use.ptr(ptr captures(address) [[M]])
325- ; CHECK-NEXT: store i8 0, ptr [[M]], align 1
326325; CHECK-NEXT: ret void
327326;
328327 %m = call ptr @malloc (i64 24 )
You can’t perform that action at this time.
0 commit comments