<div dir="ltr">Sent <a href="https://reviews.llvm.org/D77313">https://reviews.llvm.org/D77313</a> - I was guessing as to reviewers, feel free to jump on this (especially) if you know something aboutĀ this topic.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 2, 2020 at 1:51 PM Sam McCall <<a href="mailto:sammccall@google.com">sammccall@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi folks,<div><br></div><div>VectorType supports arbitrary vector sizes up to 2047, and nothing above that.</div><div>GCC supports sizes up to 2**62, but only powers of 2.</div><div>Would it make sense to support e.g. arbitrary sizes up to 256, and powers of two above that?</div><div>I'm not familiar with all the ways vector types are used, but want to reduce pressure on the size of the bitfields.</div><div><br></div><div>Currently VectorType stores its size in "all the remaining bits" left by Type.</div><div>This was 11 bits, so clang supported sizes <2048. We accidentally regressed this to 10 bits <1024 inĀ 6f428e09 when adding another bit to Type, and it turns out people have code with vector_size(1024). <a href="https://bugs.llvm.org/show_bug.cgi?id=45387" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=45387</a></div><div><br></div><div>If it would be useful, my proposal is to store a "largesize" flag and an 8-bit size. If largesize is set then the real size is 1<<size. This would save an additional bit and support big sizes.<br></div><div>If that _doesn't_ make sense, I'd probably just start treating size=0 as 1024, with the assumption that nobody was making use of sizes 1025-2043.</div><div><br></div><div>Cheers, Sam</div></div>
</blockquote></div>