[llvm] 090b07f - [RISCV] Simplify some code in unpackFromMemLoc. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 20:15:13 PDT 2024
Author: Craig Topper
Date: 2024-09-06T20:14:35-07:00
New Revision: 090b07f2e1a26d33a1c1f0c4d92b498d5738ff7a
URL: https://github.com/llvm/llvm-project/commit/090b07f2e1a26d33a1c1f0c4d92b498d5738ff7a
DIFF: https://github.com/llvm/llvm-project/commit/090b07f2e1a26d33a1c1f0c4d92b498d5738ff7a.diff
LOG: [RISCV] Simplify some code in unpackFromMemLoc. NFC
Use VA.getLocInfo() == CCValAssign::Indirect instead of checking
for scalable vector VT.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 3ef13b648493e7..636de1e69432d6 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -19084,7 +19084,7 @@ static SDValue unpackFromMemLoc(SelectionDAG &DAG, SDValue Chain,
EVT LocVT = VA.getLocVT();
EVT ValVT = VA.getValVT();
EVT PtrVT = MVT::getIntegerVT(DAG.getDataLayout().getPointerSizeInBits(0));
- if (ValVT.isScalableVector()) {
+ if (VA.getLocInfo() == CCValAssign::Indirect) {
// When the value is a scalable vector, we save the pointer which points to
// the scalable vector value in the stack. The ValVT will be the pointer
// type, instead of the scalable vector type.
@@ -19095,14 +19095,13 @@ static SDValue unpackFromMemLoc(SelectionDAG &DAG, SDValue Chain,
SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
SDValue Val;
- ISD::LoadExtType ExtType;
+ ISD::LoadExtType ExtType = ISD::NON_EXTLOAD;
switch (VA.getLocInfo()) {
default:
llvm_unreachable("Unexpected CCValAssign::LocInfo");
case CCValAssign::Full:
case CCValAssign::Indirect:
case CCValAssign::BCvt:
- ExtType = ISD::NON_EXTLOAD;
break;
}
Val = DAG.getExtLoad(
More information about the llvm-commits
mailing list