[llvm-dev] LICM doesn't work for IntrReadMem intrinsic function

Xiangyang Guo via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 1 13:11:23 PST 2015


Hi, Tim,

I see your point. Only if I set the func2 to 'readonly', the llvm.foo can
be loop invariant. Thanks.

Regards,

Xiangyang

2015-12-01 15:51 GMT-05:00 Tim Northover <t.p.northover at gmail.com>:

> On 1 December 2015 at 12:33, Xiangyang Guo via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > if I have the following IR, LICM doesn't work again, even if I use
> > '-loop-rotate' firstly. In this IR, the return value of intrinsic
> function
> > "foo" is used by another function "func2" as parameter.  However, for the
> > intrinsic function "foo", the parameters are still loop invariant. Do you
> > know why this happens? Thanks a lot.
>
> Is there anything telling LLVM that func2 won't write to memory and
> change the value returned by llvm.foo?
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151201/06d1876d/attachment.html>


More information about the llvm-dev mailing list