[LLVMdev] Question about shouldMergeGEPs in InstructionCombining

Francois Pichet pichet2000 at gmail.com
Thu Mar 12 14:06:51 PDT 2015


On Thu, Mar 12, 2015 at 5:03 PM, Francois Pichet <pichet2000 at gmail.com>
wrote:

> I think it would make sense for (1) and (2). I am not sure if (3) is
> feasible in instcombine. (I am not too familiar with LoopInfo)
>
> For the Octasic's Opus platform, I modified shouldMergeGEPs in our fork to:
>
>   if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() &&
>       !Src.hasOneUse())
>     return false;
>
>   return Src.hasAllConstantIndices(); // was return false;
>

Sorry I meant            // was return true;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150312/aa250419/attachment.html>


More information about the llvm-dev mailing list