[all-commits] [llvm/llvm-project] 7e0802: [BasicAA] Fix order in which we pass MemoryLocatio...

aeubanks via All-commits all-commits at lists.llvm.org
Tue May 10 12:09:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e0802aeb5b9059c580479049e6074f6b97ba5d6
      https://github.com/llvm/llvm-project/commit/7e0802aeb5b9059c580479049e6074f6b97ba5d6
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp

  Log Message:
  -----------
  [BasicAA] Fix order in which we pass MemoryLocations to alias()

D98718 caused the order of Values/MemoryLocations we pass to alias() to
be significant due to storing the offset in the PartialAlias case. But
some callers weren't audited and were still passing swapped arguments,
causing the returned PartialAlias offset to be negative in some
cases. For example, the newly added unittests would return -1
instead of 1.

Fixes #55343, a miscompile.

Reviewed By: asbirlea, nikic

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




More information about the All-commits mailing list