[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 03:12:17 PDT 2020


andwar added a comment.

Cheers for the fix @sdesmalen !



================
Comment at: clang/include/clang/Basic/TargetBuiltins.h:187
 
-    SVETypeFlags(uint64_t F) : Flags(F) {}
-    SVETypeFlags(EltType ET, bool IsUnsigned) : Flags(ET) {}
+    SVETypeFlags(uint64_t F) : Flags(F), EltTypeShift(0), MemEltTypeShift(0) {
+      EltTypeShift = llvm::countTrailingZeros(EltTypeMask);
----------------
`EltTypeShift` and `MemEltTypeShift` are initialised twice in one constructor.

If removing them from the member initialisation list throws a warning, perhaps you could use in-class initialisers?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76617





More information about the llvm-commits mailing list