[PATCH] D86928: [SVE][CodeGen] Fix TypeSize/ElementCount related warnings in sve-split-store.ll

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 04:00:17 PDT 2020


david-arm added a subscriber: eli.friedman.
david-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:552
     // TRUNCSTORE:i1 X -> TRUNCSTORE:i8 (and X, 1)
-    EVT NVT = EVT::getIntegerVT(*DAG.getContext(),
-                                StVT.getStoreSizeInBits());
+    EVT NVT = EVT::getIntegerVT(*DAG.getContext(), StSize.getFixedSize());
     Value = DAG.getZeroExtendInReg(Value, dl, StVT);
----------------
sdesmalen wrote:
> What guarantees that `getFixedSize` can be used here?
I think @eli.friedman mentioned that in an earlier comment that was only for scalar cases, although I agree there are no checks to actually prevent this. I just assumed that we wouldn't be creating arbitrarily large integer types, i.e. 128, 256, etc. I can try adding an extra "!StVT.isVector()" check and see if any tests fail?


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

https://reviews.llvm.org/D86928



More information about the llvm-commits mailing list