Skip to content

Commit dcaf590

Browse files
committed
address hev's comment
1 parent f78f7d3 commit dcaf590

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2522,7 +2522,8 @@ static SDValue lowerBUILD_VECTORAsBroadCastLoad(BuildVectorSDNode *BVOp,
25222522
auto *LN = cast<LoadSDNode>(IdentitySrc);
25232523
auto ExtType = LN->getExtensionType();
25242524

2525-
if (ExtType == ISD::EXTLOAD || ExtType == ISD::NON_EXTLOAD) {
2525+
if ((ExtType == ISD::EXTLOAD || ExtType == ISD::NON_EXTLOAD) &&
2526+
VT.getScalarSizeInBits() == LN->getMemoryVT().getScalarSizeInBits()) {
25262527
SDVTList Tys =
25272528
LN->isIndexed()
25282529
? DAG.getVTList(VT, LN->getBasePtr().getValueType(), MVT::Other)

0 commit comments

Comments
 (0)