File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1078,9 +1078,8 @@ VPlan *VPlan::duplicate() {
1078
1078
auto *NewPlan = new VPlan (NewPreheader, cast<VPBasicBlock>(NewEntry));
1079
1079
DenseMap<VPValue *, VPValue *> Old2NewVPValues;
1080
1080
for (VPValue *OldLiveIn : VPLiveInsToFree) {
1081
- VPValue *NewLiveIn = new VPValue (OldLiveIn->getLiveInIRValue ());
1082
- NewPlan->VPLiveInsToFree .push_back (NewLiveIn);
1083
- Old2NewVPValues[OldLiveIn] = NewLiveIn;
1081
+ Old2NewVPValues[OldLiveIn] =
1082
+ NewPlan->getVPValueOrAddLiveIn (OldLiveIn->getLiveInIRValue ());
1084
1083
}
1085
1084
Old2NewVPValues[&VectorTripCount] = &NewPlan->VectorTripCount ;
1086
1085
Old2NewVPValues[&VFxUF] = &NewPlan->VFxUF ;
@@ -1090,7 +1089,8 @@ VPlan *VPlan::duplicate() {
1090
1089
}
1091
1090
assert (TripCount && " trip count must be set" );
1092
1091
if (TripCount->isLiveIn ())
1093
- Old2NewVPValues[TripCount] = new VPValue (TripCount->getLiveInIRValue ());
1092
+ Old2NewVPValues[TripCount] =
1093
+ NewPlan->getVPValueOrAddLiveIn (TripCount->getLiveInIRValue ());
1094
1094
// else NewTripCount will be created and inserted into Old2NewVPValues when
1095
1095
// TripCount is cloned. In any case NewPlan->TripCount is updated below.
1096
1096
You can’t perform that action at this time.
0 commit comments