<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 30, 2016 at 4:04 PM, Sanjoy Das 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">This came up in D20764, this IR verifies today:<br>
<br>
%X = type opaque<br>
<br>
define void @f_0(%X* %ptr) {<br>
%t = load %X, %X* %ptr<br>
ret void<br>
}<br>
<br>
define void @f_1(%X %val, %X* %ptr) {<br>
store %X %val, %X* %ptr<br>
ret void<br>
}<br>
<br>
which I found surprising -- what does it mean to load / store values<br>
of unknown sizes? Passing it to llc fails an assertion. Are there<br>
legitimate cases where we'd want to generate such IR?<br></blockquote><div><br></div><div>You can also get it to crash by throwing it at InstCombine. I think we should add a verifier rule to make memory operations sized.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- Sanjoy<br>
_______________________________________________<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/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div></div>