Skip to content

Commit cd921ac

Browse files
committed
[NFC] InstCombineNegator: use auto where type is obvious from the cast
1 parent 4038105 commit cd921ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ LLVM_NODISCARD Value *Negator::visit(Value *V, unsigned Depth) {
243243
switch (I->getOpcode()) {
244244
case Instruction::PHI: {
245245
// `phi` is negatible if all the incoming values are negatible.
246-
PHINode *PHI = cast<PHINode>(I);
246+
auto *PHI = cast<PHINode>(I);
247247
SmallVector<Value *, 4> NegatedIncomingValues(PHI->getNumOperands());
248248
for (auto I : zip(PHI->incoming_values(), NegatedIncomingValues)) {
249249
if (!(std::get<1>(I) = visit(std::get<0>(I), Depth + 1))) // Early return.
@@ -285,7 +285,7 @@ LLVM_NODISCARD Value *Negator::visit(Value *V, unsigned Depth) {
285285
}
286286
case Instruction::ShuffleVector: {
287287
// `shufflevector` is negatible if both operands are negatible.
288-
ShuffleVectorInst *Shuf = cast<ShuffleVectorInst>(I);
288+
auto *Shuf = cast<ShuffleVectorInst>(I);
289289
Value *NegOp0 = visit(I->getOperand(0), Depth + 1);
290290
if (!NegOp0) // Early return.
291291
return nullptr;

0 commit comments

Comments
 (0)