Skip to content

Commit 772eb2f

Browse files
committed
remove duplicate pushes to Worklist
replaceValue adds new instruction to the worklist internally, so don't need to push it to the worklist to remove it.
1 parent fc06d20 commit 772eb2f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,8 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
371371
Worklist.pushValue(Result);
372372
Result = Builder.CreateShuffleVector(Result, Mask);
373373
Worklist.pushValue(Result);
374-
if (NeedCast) {
374+
if (NeedCast)
375375
Result = Builder.CreateBitOrPointerCast(Result, I.getType());
376-
Worklist.pushValue(Result);
377-
}
378376

379377
replaceValue(I, *Result);
380378
++NumVecLoad;

0 commit comments

Comments
 (0)