paulwalker-arm added inline comments.

================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:730
       ASTContext::BuiltinVectorTypeInfo Info =
-          CGM.getContext().getBuiltinVectorTypeInfo(BT);
-      unsigned NumElemsPerVG = (Info.EC.getKnownMinValue() * Info.NumVectors) 
/ 2;
+          // For svcount_t, only the lower 16 bits are relevant.
+          BT->getKind() == BuiltinType::SveCount
----------------
Given predicates are stored byte wise perhaps it's worth being more explicit 
and saying "only the first 2 bytes are relevant"?


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:739
+      // bitpattern for predicates instead.
+      unsigned NumElems = Info.EC.getKnownMinValue() * Info.NumVectors;
       if (Info.ElementType == CGM.getContext().BoolTy) {
----------------
Do we need an assert that `Info.NumVectors` is 1 for `svcount_t`? I don't think 
we plan of having `svcountx2_t`, but if we did then I think this code is 
incorrect because `UpperBound` will not take the padding between the "live 
16bit values" into account? And an assert would at least give us a modicum of 
protection.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136864

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to