david-arm added inline comments.
================
Comment at: llvm/include/llvm/Support/TypeSize.h:108
+
+ bool isPowerOf2() const { return isPowerOf2_32(Min); }
};
----------------
paulwalker-arm wrote:
> I don't believe this is safe. For example we know SVE supported vector
> lengths only have to be a multiple of 128bits. So for scalable vectors we
> cannot know the element count is a power of 2 unless we perform a runtime
> check.
Ok, but if that's true how is code in llvm/lib/CodeGen/TargetLoweringBase.cpp
ever safe for scalable vectors? I thought that the question being asked wasn't
that the total size was a power of 2, but whether or not it was safe to split
the vector. The answer should be the same even if vscale is 3, for example. I
thought the problem here is that the legaliser simply needs to know in what way
it should break down different types, and that whatever approach it took would
work when scaled up. The vector breakdown algorithm relies upon having an
answer here - perhaps this is just a case of changing the question and name of
function?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86065/new/
https://reviews.llvm.org/D86065
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits