<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">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>