[llvm] 6d16361 - [SDAG] Manual jumpthread in findMemType for style clarity [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 13:22:43 PDT 2024
Author: Philip Reames
Date: 2024-07-25T13:22:25-07:00
New Revision: 6d163613621faec5050f49b9cb9da15931359090
URL: https://github.com/llvm/llvm-project/commit/6d163613621faec5050f49b9cb9da15931359090
DIFF: https://github.com/llvm/llvm-project/commit/6d163613621faec5050f49b9cb9da15931359090.diff
LOG: [SDAG] Manual jumpthread in findMemType for style clarity [NFC]
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 92b62ccdc2755..5672b611234b8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -7299,14 +7299,14 @@ static std::optional<EVT> findMemType(SelectionDAG &DAG,
unsigned WidenEltWidth = WidenEltVT.getSizeInBits();
unsigned AlignInBits = Align*8;
- // If we have one element to load/store, return it.
EVT RetVT = WidenEltVT;
- if (!Scalable && Width == WidenEltWidth)
- return RetVT;
-
// Don't bother looking for an integer type if the vector is scalable, skip
// to vector types.
if (!Scalable) {
+ // If we have one element to load/store, return it.
+ if (Width == WidenEltWidth)
+ return RetVT;
+
// See if there is larger legal integer than the element type to load/store.
for (EVT MemVT : reverse(MVT::integer_valuetypes())) {
unsigned MemVTWidth = MemVT.getSizeInBits();
More information about the llvm-commits
mailing list