Ryan Taylor via llvm-dev
2021-Jan-14 16:51 UTC
[llvm-dev] GVN removing loads that are affected by call
So given an intrinsic that has a pointer as in/out and IntrWriteMem property. call intrinsic(address a, ....); loop over address a load from address a + offset call intrinsic (address a, ...); loop over address a load from address a + offset GVN is removing the second loads, despite the second call overwriting the memory starting at address a. AA has the intrinsics marked as unknown instructions but has all of these as mayAlias in a set. I'm not seeing this issue with -fno-unroll-loops. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210114/494c11ac/attachment.html>
Roman Lebedev via llvm-dev
2021-Jan-14 16:53 UTC
[llvm-dev] GVN removing loads that are affected by call
It would be good to have an actual IR reproducer here. On Thu, Jan 14, 2021 at 7:51 PM Ryan Taylor via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > So given an intrinsic that has a pointer as in/out and IntrWriteMem property. > > call intrinsic(address a, ....); > loop over address a > load from address a + offset > call intrinsic (address a, ...); > loop over address a > load from address a + offset > > GVN is removing the second loads, despite the second call overwriting the memory starting at address a. AA has the intrinsics marked as unknown instructions but has all of these as mayAlias in a set. I'm not seeing this issue with -fno-unroll-loops. > > Thanks. > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev