[llvm-dev] Signed Div SCEVs

Alexandre Isoard via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 12 17:48:22 PDT 2019


Hi Dangeti and Sanjoy,

We have had issues with sdiv/srem creeping in due to address computation
being "signed".
We work around that by running a transformation passe that transform
sdiv/srem into udiv/urem when we can prove they work on non-negative values.

The cost you are talking about is development cost, or do you expect a
runtime cost too?

On Sat, Mar 23, 2019 at 11:30 AM Sanjoy Das via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> The short answer is that introducing new operations to SCEV has a high
> cost, and we have not seen use cases that justify paying that cost.
>
> Have you run into situations where an sdiv operation would help?
>
> -- Sanjoy
>
> On Thu, Mar 21, 2019 at 6:01 AM Dangeti Tharun kumar via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > Hi,
> >
> > I am working with SCEVs, I see the unsigned division of SCEVs, it is not
> immediately clear to me why the signed division of SCEV expressions is not
> supported by SE?
> >
> > I would appreciate if some could clarify or point me to some links.
> >
> > --
> > Regards,
> > DTharun
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


-- 
*Alexandre Isoard*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190412/378e6a0c/attachment.html>


More information about the llvm-dev mailing list