Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp =================================================================== --- llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -69,15 +69,6 @@ static cl::opt EnableRecPhiAnalysis("basic-aa-recphi", cl::Hidden, cl::init(true)); -/// By default, even on 32-bit architectures we use 64-bit integers for -/// calculations. This will allow us to more-aggressively decompose indexing -/// expressions calculated using i64 values (e.g., long long in C) which is -/// common enough to worry about. -static cl::opt ForceAtLeast64Bits("basic-aa-force-at-least-64b", - cl::Hidden, cl::init(true)); -static cl::opt DoubleCalcBits("basic-aa-double-calc-bits", - cl::Hidden, cl::init(false)); - /// SearchLimitReached / SearchTimes shows how often the limit of /// to decompose GEPs is reached. It will affect the precision /// of basic alias analysis. @@ -468,14 +459,6 @@ return (Offset << ShiftBits).ashr(ShiftBits); } -static unsigned getMaxPointerSize(const DataLayout &DL) { - unsigned MaxPointerSize = DL.getMaxPointerSizeInBits(); - if (MaxPointerSize < 64 && ForceAtLeast64Bits) MaxPointerSize = 64; - if (DoubleCalcBits) MaxPointerSize *= 2; - - return MaxPointerSize; -} - namespace { // A linear transformation of a Value; this class represents // ZExt(SExt(V, SExtBits), ZExtBits) * Scale. @@ -556,7 +539,7 @@ SearchTimes++; const Instruction *CxtI = dyn_cast(V); - unsigned MaxPointerSize = getMaxPointerSize(DL); + unsigned MaxPointerSize = DL.getMaxPointerSizeInBits(); DecomposedGEP Decomposed; Decomposed.Offset = APInt(MaxPointerSize, 0); Decomposed.HasCompileTimeConstantScale = true; Index: llvm/test/Analysis/BasicAA/gep-and-alias.ll =================================================================== --- llvm/test/Analysis/BasicAA/gep-and-alias.ll +++ llvm/test/Analysis/BasicAA/gep-and-alias.ll @@ -1,5 +1,4 @@ ; RUN: opt -S -basic-aa -gvn < %s | FileCheck %s -; RUN: opt -S -basic-aa -gvn -basic-aa-force-at-least-64b=0 < %s | FileCheck %s target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128" target triple = "i386-apple-macosx10.6.0"