diff --git a/lib/Passes/PassBuilder.cpp b/lib/Passes/PassBuilder.cpp index 17f7bace60d..1070815250f 100644 --- a/lib/Passes/PassBuilder.cpp +++ b/lib/Passes/PassBuilder.cpp @@ -25,6 +25,7 @@ #include "llvm/Analysis/LazyCallGraph.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolution.h" +#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/Dominators.h" diff --git a/lib/Passes/PassRegistry.def b/lib/Passes/PassRegistry.def index add47b2329d..c6151a654b5 100644 --- a/lib/Passes/PassRegistry.def +++ b/lib/Passes/PassRegistry.def @@ -70,6 +70,7 @@ FUNCTION_ANALYSIS("targetir", #endif FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA()) FUNCTION_ALIAS_ANALYSIS("cfl-aa", CFLAA()) +FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA()) #undef FUNCTION_ALIAS_ANALYSIS #undef FUNCTION_ANALYSIS diff --git a/test/Analysis/ScalarEvolution/scev-aa.ll b/test/Analysis/ScalarEvolution/scev-aa.ll index 47a84d57c3b..682bd2134af 100644 --- a/test/Analysis/ScalarEvolution/scev-aa.ll +++ b/test/Analysis/ScalarEvolution/scev-aa.ll @@ -1,5 +1,7 @@ ; RUN: opt -disable-output < %s -disable-basicaa -scev-aa -aa-eval -print-all-alias-modref-info \ ; RUN: 2>&1 | FileCheck %s +; RUN: opt -disable-output < %s -aa-pipeline=scev-aa -passes=aa-eval -print-all-alias-modref-info \ +; RUN: 2>&1 | FileCheck %s ; At the time of this writing, -basicaa misses the example of the form ; A[i+(j+1)] != A[i+j], which can arise from multi-dimensional array references,