Skip to content

Commit cde783a

Browse files
committed
Avoid repeated getOperand() calls.
1 parent 9245d08 commit cde783a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,9 +1783,9 @@ bool VectorCombine::foldShuffleOfShuffles(Instruction &I) {
17831783
InstructionCost NewCost =
17841784
TTI.getShuffleCost(TargetTransformInfo::SK_PermuteTwoSrc, ShuffleSrcTy,
17851785
NewMask, CostKind, 0, nullptr, {V0, V1});
1786-
if (!I.getOperand(0)->hasOneUse())
1786+
if (!ShufI0->hasOneUse())
17871787
NewCost += InnerCost0;
1788-
if (!I.getOperand(1)->hasOneUse())
1788+
if (!ShufI1->hasOneUse())
17891789
NewCost += InnerCost1;
17901790

17911791
LLVM_DEBUG(dbgs() << "Found a shuffle feeding two shuffles: " << I

0 commit comments

Comments
 (0)