[LLVMdev] How to deal with wider Integer type?

Chandler Carruth chandlerc at google.com
Wed Sep 3 23:23:16 PDT 2014


Yes, the LLVM backend does type legalization on the SelectionDAG formed
from the LLVM IR. This eliminates too-wide integer types by decomposing the
operations.

However, SROA never produces an integer wider than what was used in the
input IR that I know of... I would be surprised if GVN did this either.


On Wed, Sep 3, 2014 at 10:53 PM, Ruiling Song <ruiling.song83 at gmail.com>
wrote:

> Hi,
>
> I am currently working on an opencl project based on LLVM, the target
> device is 32bit.
> I met a problem that some llvm passes like GVN SROA will generate some IR
> operating
> on wide integer types like i128 or i512. But the device does not support
> such kind of data type.
> Is there any idea on how to lower this kind of IR to only operate on i32
> or vector of i32? Or is there any existing code handle this?
>
> Thanks!
> Ruiling
>
> _______________________________________________
> 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/20140903/eb74f602/attachment.html>


More information about the llvm-dev mailing list