[PATCH] D112000: [SelectionDAG] Allow FindMemType to fail when widening loads & stores

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 08:57:10 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5025
   SmallVector<SDValue, 16> StChain;
-  GenWidenVectorStores(StChain, ST);
+  if (GenWidenVectorStores(StChain, ST)) {
+    if (StChain.size() == 1)
----------------
(style)
```
if (!GenWidenVectorStores(StChain, ST))
  llvm_unreachable("Unable to widen vector store");
```


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5421
+  if (!TypeSize::isKnownLE(LdWidth, FirstVTWidth)) {
+    auto NewVT = FirstVT;
+    TypeSize RemainingWidth = LdWidth;
----------------
(style) It'd be better if you didn't use auto


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5644
     // Find the largest vector type we can store with.
-    EVT NewVT = FindMemType(DAG, TLI, StWidth.getKnownMinSize(), ValVT);
+    auto NewVT = findMemType(DAG, TLI, StWidth.getKnownMinSize(), ValVT);
+    if (!NewVT)
----------------
(style) It'd be better if you didn't use auto


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112000/new/

https://reviews.llvm.org/D112000



More information about the llvm-commits mailing list