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

Ryan Taylor via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 28 17:00:12 PDT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200928/fe236d1d/attachment.html>


More information about the llvm-dev mailing list