[llvm] 6eef8d9 - [RISCV] Fix an unused variable warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 08:45:41 PDT 2023


Author: Kazu Hirata
Date: 2023-05-31T08:45:29-07:00
New Revision: 6eef8d9b2bbfdb3920b6eeafc939a2d62ad5295b

URL: https://github.com/llvm/llvm-project/commit/6eef8d9b2bbfdb3920b6eeafc939a2d62ad5295b
DIFF: https://github.com/llvm/llvm-project/commit/6eef8d9b2bbfdb3920b6eeafc939a2d62ad5295b.diff

LOG: [RISCV] Fix an unused variable warning

 llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3793:7:
 error: unused variable 'XLenVT' [-Werror,-Wunused-variable]

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 a28dbef82db3..582e66bce565 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -3790,7 +3790,6 @@ static SDValue lowerVECTOR_SHUFFLEAsVSlide1(const SDLoc &DL, MVT VT,
   if (InsertIdx < 0 || InsertIdx / NumElts != (unsigned)OpsSwapped)
     return SDValue();
 
-  MVT XLenVT = Subtarget.getXLenVT();
   MVT ContainerVT = getContainerForFixedLengthVector(DAG, VT, Subtarget);
   auto [TrueMask, VL] = getDefaultVLOps(VT, ContainerVT, DL, DAG, Subtarget);
   auto OpCode = IsVSlidedown ?


        


More information about the llvm-commits mailing list