Skip to content

Commit 04f815c

Browse files
committed
[SelectionDAGBuilder] Remove LegalTypes=false from a call to getShiftAmountConstant.
getShiftAmountTy will return MVT::i32 if the shift amount coming from the target's getScalarShiftAmountTy can't reprsent all possible values. That should eliminate the need to use the pointer type which is what we do when LegalTypes is false. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D120165
1 parent 86b5e25 commit 04f815c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ static void getCopyToParts(SelectionDAG &DAG, const SDLoc &DL, SDValue Val,
566566
unsigned RoundBits = RoundParts * PartBits;
567567
unsigned OddParts = NumParts - RoundParts;
568568
SDValue OddVal = DAG.getNode(ISD::SRL, DL, ValueVT, Val,
569-
DAG.getShiftAmountConstant(RoundBits, ValueVT, DL, /*LegalTypes*/false));
569+
DAG.getShiftAmountConstant(RoundBits, ValueVT, DL));
570570

571571
getCopyToParts(DAG, DL, OddVal, Parts + RoundParts, OddParts, PartVT, V,
572572
CallConv);

0 commit comments

Comments
 (0)