[llvm-dev] GVN removing loads that are affected by call

Roman Lebedev via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 14 08:53:41 PST 2021


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


More information about the llvm-dev mailing list