[PATCH] D48066: Add one more No-alias case to alias analysis.

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 06:51:00 PDT 2018


jaykang10 added a comment.

  knownZeros(n) == (knownZeros(idx) << 1) | 1 and
  knownOnes(n) == knownOnes(idx) << 1

I meant if nothing is known about idx, we fail to get No-alias opportunity. If there is nothing for KnownBits, let's just check odd number and the idx is used by both offsets as below.

  if (success of computeKnownBits with `n` and `idx`) {
    knownZeros(n) == (knownZeros(idx) << 1) | 1 and
    knownOnes(n) == knownOnes(idx) << 1
  } else {
    check just LHS is odd number and RHS is shared by offsets.
  }

How do you think about it? @hfinkel


https://reviews.llvm.org/D48066





More information about the llvm-commits mailing list