[LLVMdev] larger-than-legal types in LLVM IR

Quentin Colombet qcolombet at apple.com
Mon Jan 19 16:50:32 PST 2015


Hi Sanjay,

> On Jan 19, 2015, at 4:38 PM, Sanjay Patel <spatel at rotateright.com> wrote:
> 
> Are there any LLVM guidelines / documentation for handling larger-than-legal data types (either scalars or vectors)?
> 
> Currently, the backend may crash [1], miscompile [2], or make a big mess [3] when presented with data types that are bigger than native. 
> 
> 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.

I’d say it is legal for the vectorizer to produce non-legal types as long as the expected codegen cost is smaller than the scalar version. That being said, this is possible there is a bug in the vectorizer cost model or the use of this cost model!

Cheers,
-Quentin

> 
> [1] http://llvm.org/bugs/show_bug.cgi?id=19797 <http://llvm.org/bugs/show_bug.cgi?id=19797>
> [2] http://llvm.org/bugs/show_bug.cgi?id=21184 <http://llvm.org/bugs/show_bug.cgi?id=21184>
> [3] http://llvm.org/bugs/show_bug.cgi?id=20225 <http://llvm.org/bugs/show_bug.cgi?id=20225>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150119/0db8d3b4/attachment.html>


More information about the llvm-dev mailing list