[llvm] ac35c1d - [RISCV] Minor style cleanup in lowerVECTOR_SHUFFLEAsVNSRL [nfc]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 12:06:50 PST 2023


Author: Philip Reames
Date: 2023-02-21T12:06:43-08:00
New Revision: ac35c1d85938f6804c145fb094ae1e7118a7b72c

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

LOG: [RISCV] Minor style cleanup in lowerVECTOR_SHUFFLEAsVNSRL [nfc]

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 380094197886..f7c97b551ede 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -3111,15 +3111,13 @@ static SDValue lowerVECTOR_SHUFFLEAsVNSRL(const SDLoc &DL, MVT VT,
   // Convert the vector to a wider integer type with the original element
   // count. This also converts FP to int.
   unsigned EltBits = ContainerVT.getScalarSizeInBits();
-  MVT WideIntEltVT = MVT::getIntegerVT(EltBits * 2);
   MVT WideIntContainerVT =
-      MVT::getVectorVT(WideIntEltVT, ContainerVT.getVectorElementCount());
+    MVT::getVectorVT(MVT::getIntegerVT(EltBits * 2),
+                     ContainerVT.getVectorElementCount());
   Src = DAG.getBitcast(WideIntContainerVT, Src);
 
-  // Convert to the integer version of the container type.
-  MVT IntEltVT = MVT::getIntegerVT(EltBits);
-  MVT IntContainerVT =
-      MVT::getVectorVT(IntEltVT, ContainerVT.getVectorElementCount());
+  // The integer version of the container type.
+  MVT IntContainerVT = ContainerVT.changeVectorElementTypeToInteger();
 
   // If we want even elements, then the shift amount is 0. Otherwise, shift by
   // the original element size.


        


More information about the llvm-commits mailing list