[all-commits] [llvm/llvm-project] 22324a: [BasicAA] Add additional negative phi tests. NFC

David Green via All-commits all-commits at lists.llvm.org
Mon Jul 27 08:06:12 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 22324a62231082a18c59052232d16c055c1a2968
      https://github.com/llvm/llvm-project/commit/22324a62231082a18c59052232d16c055c1a2968
  Author: David Green <david.green at arm.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M llvm/test/Analysis/BasicAA/recphi.ll

  Log Message:
  -----------
  [BasicAA] Add additional negative phi tests. NFC

(cherry picked from commit 30fa57662760e1489cf70cb411c55fbe9fc189fe)


  Commit: 00ed5355e45b4d7e84366619dbbbb9df9b4aa816
      https://github.com/llvm/llvm-project/commit/00ed5355e45b4d7e84366619dbbbb9df9b4aa816
  Author: David Green <david.green at arm.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/test/Analysis/BasicAA/recphi.ll

  Log Message:
  -----------
  [BasicAA] Fix -basicaa-recphi for geps with negative offsets

As shown in D82998, the basic-aa-recphi option can cause miscompiles for
gep's with negative constants. The option checks for recursive phi, that
recurse through a contant gep. If it finds one, it performs aliasing
calculations using the other phi operands with an unknown size, to
specify that an unknown number of elements after the initial value are
potentially accessed. This works fine expect where the constant is
negative, as the size is still considered to be positive. So this patch
expands the check to make sure that the constant is also positive.

Differential Revision: https://reviews.llvm.org/D83576

(cherry picked from commit 311fafd2c90aed5b3fed9566503eebe629f1e979)


Compare: https://github.com/llvm/llvm-project/compare/9dea95b78082...00ed5355e45b


More information about the All-commits mailing list