<div dir="ltr">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.<div><br></div><div>I hope people aren't actually trying to load a >4GB array and hoping to do something good with it.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 2, 2017 at 2:01 PM, Xin Tong via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
Can someone explain to me why we cant use uint64_t for extractvalue<br>
and insertvalue indices, while GEP on arrays can have indices of any<br>
integer type. Basically if I load an array with UINT_MAX+O (O>=2)<br>
elements, I can not extract its last element.<br>
<br>
Given this restriction I feel we have a bug here (uint64_t is passed<br>
as a unsigned). This cant happen because of the if (NumElements ><br>
1024) guard, but its a bug anyways.<br>
<br>
<a href="https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp#L634" rel="noreferrer" target="_blank">https://github.com/llvm-<wbr>mirror/llvm/blob/master/lib/<wbr>Transforms/InstCombine/<wbr>InstCombineLoadStoreAlloca.<wbr>cpp#L634</a><br>
<br>
Thanks,<br>
-Xin<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>