[llvm-dev] Indices for extractvalue and insertvalue
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Tue Jan 3 08:45:15 PST 2017
I think originally insertvalue / extractvalue were only intended to work on
struct values. LLVM struct types can have up to 2**32 element types, and
the insertvalue/extractvalue indices match that.
I hope people aren't actually trying to load a >4GB array and hoping to do
something good with it.
On Mon, Jan 2, 2017 at 2:01 PM, Xin Tong via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Can someone explain to me why we cant use uint64_t for extractvalue
> and insertvalue indices, while GEP on arrays can have indices of any
> integer type. Basically if I load an array with UINT_MAX+O (O>=2)
> elements, I can not extract its last element.
> Given this restriction I feel we have a bug here (uint64_t is passed
> as a unsigned). This cant happen because of the if (NumElements >
> 1024) guard, but its a bug anyways.
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev