[llvm-dev] restrict func param losing noalias when inlined

Johannes Doerfert via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 28 17:50:51 PDT 2020


Hi Ryan,

the alias metadata was (and is) broken for various reasons.
he replacement is currently under review, I can point you to it,
however, to be honest, I'm unclear how we are supposed to help
you with LLVM 6 right now.

Cheers,
   Johannes


On 9/28/20 7:00 PM, Ryan Taylor via llvm-dev wrote:
> Given some code:
>
> void func (float * restrict a, float *b) {
>    for (int i =0; i < 100; ++i) {
>      a[i] = b[i] + 1;
>    }
> }
>
> float * aa;
> float * bb;
> int main() {
>     func(aa, bb);
>     return 0;
> }
>
> produces IR that has the llvm.noalias intrinsic along with the !noalias
> metadata:for both the load and store, however, AA returns MayAlias, I would
> expect a NoAlias?
>
> This is also an older version of llvm: 6 (yes, I know, sigh).
>
> Thanks,
>
> Ryan
>
>
> _______________________________________________
> 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