[all-commits] [llvm/llvm-project] 59289a: [AA] Handle callbr instructions in alias analysis

Ricky Zhou via All-commits all-commits at lists.llvm.org
Tue Dec 21 10:14:54 PST 2021

  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 59289a837b0080378ffd0c70b1aac6585ab21e15
  Author: Ricky Zhou <ricky at rzhou.org>
  Date:   2021-12-21 (Tue, 21 Dec 2021)

  Changed paths:
    M llvm/lib/Analysis/AliasAnalysis.cpp
    A llvm/test/Analysis/BasicAA/pr52735.ll

  Log Message:
  [AA] Handle callbr instructions in alias analysis

Before this change, AAResults::getModRefInfo() was missing a case for
callbr instructions (asm goto), which may read/write memory. In PR52735,
this led to a miscompile where a load was incorrect eliminated.

Add this missing case, as well as an assert verifying that all
memory-accessing instructions are handled properly.

Fixes #52735.

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

(cherry picked from commit 9927a06f74bb48e1e5a53fb686301c71f0dec46a)

More information about the All-commits mailing list