Skip to content

Commit baebe71

Browse files
committed
[AArch64] Address post-commit comments from D150482.
Address @v01dXYZ's comments, thanks!
1 parent 879e886 commit baebe71

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14655,7 +14655,6 @@ bool AArch64TargetLowering::optimizeExtendOrTruncateConversion(
1465514655
return false;
1465614656

1465714657
DstTy = TruncDstType;
14658-
DstWidth = TruncDstType->getElementType()->getScalarSizeInBits();
1465914658
}
1466014659

1466114660
return createTblShuffleForZExt(ZExt, DstTy, Subtarget->isLittleEndian());

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
18981898
continue;
18991899
// Use provided Src type for I and other casts that have the same source
19001900
// type.
1901-
if (Op == I || Cast->getSrcTy() == Cast->getSrcTy())
1901+
if (Op == I || cast<CastInst>(I)->getSrcTy() == Cast->getSrcTy())
19021902
SrcTys.push_back(Src);
19031903
else
19041904
SrcTys.push_back(Cast->getSrcTy());
@@ -1913,7 +1913,8 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
19131913
// version of the widening instruction.
19141914
if (auto *Cast = dyn_cast<CastInst>(SingleUser->getOperand(1)))
19151915
if (I->getOpcode() == unsigned(Cast->getOpcode()) &&
1916-
(Src == Cast->getSrcTy() || Cast->getSrcTy() == Cast->getSrcTy()))
1916+
(Src == Cast->getSrcTy() ||
1917+
cast<CastInst>(I)->getSrcTy() == Cast->getSrcTy()))
19171918
return 0;
19181919
}
19191920
}

0 commit comments

Comments
 (0)