Skip to content

Commit 5b606bd

Browse files
committed
[LoongArch] Use getShiftAmountConstant. NFC
This avoids an unnecessary type legalization step to fix the shift amount.
1 parent da98be1 commit 5b606bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5542,7 +5542,7 @@ static SDValue performBITCASTCombine(SDNode *N, SelectionDAG &DAG,
55425542
Lo = DAG.getNode(LoongArchISD::VMSKLTZ, DL, GRLenVT, Lo);
55435543
Hi = DAG.getNode(LoongArchISD::VMSKLTZ, DL, GRLenVT, Hi);
55445544
Hi = DAG.getNode(ISD::SHL, DL, GRLenVT, Hi,
5545-
DAG.getConstant(16, DL, MVT::i8));
5545+
DAG.getShiftAmountConstant(16, GRLenVT, DL));
55465546
V = DAG.getNode(ISD::OR, DL, GRLenVT, Lo, Hi);
55475547
} else if (UseLASX) {
55485548
return SDValue();

0 commit comments

Comments
 (0)