<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPhone</div><div><br>On Jan 19, 2015, at 4:38 PM, Sanjay Patel <<a href="mailto:spatel@rotateright.com">spatel@rotateright.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Are there any LLVM guidelines / documentation for handling larger-than-legal data types (either scalars or vectors)?<br><br></div>Currently, the backend may crash [1], miscompile [2], or make a big mess [3] when presented with data types that are bigger than native. <br><br>In the case of [3], is it a bug in the vectorizer to produce a non-legal vector type (<16 x i64>) or should the backend be able to handle that more reasonably? In that particular case, things are further complicated because -loop-unroll is able to completely remove the loop and the large vector type disappears.<br></div></div></blockquote><div><br></div>Crashing on an illegal type is a bug.<div><br></div><div>We can sometimes get bigger than legal types if the loop has code that goes from type to the (e.g casts).</div><div><br></div><div>What should happen is that codegen handles those types gracefully and that the cost model estimated the cost of the generated code correctly (conservatively).</div><div><br></div><div>If the cost does not match the genarated code we should fix the cost model: either by returning a target specific cost eg. X86TTI or by adjusting the shared cost model basictti.</div><div><br></div><div><br><blockquote type="cite"><div><div dir="ltr"><br>[1] <a href="http://llvm.org/bugs/show_bug.cgi?id=19797">http://llvm.org/bugs/show_bug.cgi?id=19797</a><br>[2] <a href="http://llvm.org/bugs/show_bug.cgi?id=21184">http://llvm.org/bugs/show_bug.cgi?id=21184</a><br>[3] <a href="http://llvm.org/bugs/show_bug.cgi?id=20225">http://llvm.org/bugs/show_bug.cgi?id=20225</a><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a></span><br><span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></span><br></div></blockquote></div></body></html>