Skip to content

Commit 090b07f

Browse files
committed
[RISCV] Simplify some code in unpackFromMemLoc. NFC
Use VA.getLocInfo() == CCValAssign::Indirect instead of checking for scalable vector VT.
1 parent d7fb5b9 commit 090b07f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19084,7 +19084,7 @@ static SDValue unpackFromMemLoc(SelectionDAG &DAG, SDValue Chain,
1908419084
EVT LocVT = VA.getLocVT();
1908519085
EVT ValVT = VA.getValVT();
1908619086
EVT PtrVT = MVT::getIntegerVT(DAG.getDataLayout().getPointerSizeInBits(0));
19087-
if (ValVT.isScalableVector()) {
19087+
if (VA.getLocInfo() == CCValAssign::Indirect) {
1908819088
// When the value is a scalable vector, we save the pointer which points to
1908919089
// the scalable vector value in the stack. The ValVT will be the pointer
1909019090
// type, instead of the scalable vector type.
@@ -19095,14 +19095,13 @@ static SDValue unpackFromMemLoc(SelectionDAG &DAG, SDValue Chain,
1909519095
SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
1909619096
SDValue Val;
1909719097

19098-
ISD::LoadExtType ExtType;
19098+
ISD::LoadExtType ExtType = ISD::NON_EXTLOAD;
1909919099
switch (VA.getLocInfo()) {
1910019100
default:
1910119101
llvm_unreachable("Unexpected CCValAssign::LocInfo");
1910219102
case CCValAssign::Full:
1910319103
case CCValAssign::Indirect:
1910419104
case CCValAssign::BCvt:
19105-
ExtType = ISD::NON_EXTLOAD;
1910619105
break;
1910719106
}
1910819107
Val = DAG.getExtLoad(

0 commit comments

Comments
 (0)