[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
I see your point. Only if I set the func2 to 'readonly', the llvm.foo can
be loop invariant. Thanks.
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
> > "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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev