diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index b1578f4b88e..2ede4baaf68 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -66,7 +66,7 @@ using namespace llvm; /// Enable analysis of recursive PHI nodes. static cl::opt EnableRecPhiAnalysis("basic-aa-recphi", cl::Hidden, - cl::init(false)); + 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 diff --git a/test/Analysis/BasicAA/phi-loop.ll b/test/Analysis/BasicAA/phi-loop.ll index db3023c6560..e54752a9223 100644 --- a/test/Analysis/BasicAA/phi-loop.ll +++ b/test/Analysis/BasicAA/phi-loop.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basic-aa -basic-aa-recphi=1 -gvn -S | FileCheck %s +; RUN: opt < %s -basic-aa -gvn -S | FileCheck %s ; ; Check that section->word_ofs doesn't get reloaded in every iteration of the ; for loop. diff --git a/test/Analysis/BasicAA/recphi.ll b/test/Analysis/BasicAA/recphi.ll index dfc88937bf6..a6157f22a4f 100644 --- a/test/Analysis/BasicAA/recphi.ll +++ b/test/Analysis/BasicAA/recphi.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basic-aa -aa-eval -print-all-alias-modref-info -basic-aa-recphi -disable-output 2>&1 | FileCheck %s +; RUN: opt < %s -basic-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; CHECK-LABEL: Function: simple: 5 pointers, 0 call sites ; CHECK: NoAlias: float* %src1, float* %src2 diff --git a/test/Transforms/LoopIdiom/reuse-cast.ll b/test/Transforms/LoopIdiom/reuse-cast.ll index 0b1bfeaa273..0dda3515156 100644 --- a/test/Transforms/LoopIdiom/reuse-cast.ll +++ b/test/Transforms/LoopIdiom/reuse-cast.ll @@ -83,21 +83,22 @@ declare void @use.i1(i1) define void @reuse_cast_2(i32 %x, i32* %ptr.1.start) { ; CHECK-LABEL: @reuse_cast_2( ; CHECK-NEXT: entry: +; CHECK-NEXT: [[PTR_1_START1:%.*]] = bitcast i32* [[PTR_1_START:%.*]] to i8* ; CHECK-NEXT: [[STACK:%.*]] = alloca [2 x i32], align 4 ; CHECK-NEXT: [[CAST_TO_REUSE:%.*]] = bitcast [2 x i32]* [[STACK]] to i8* ; CHECK-NEXT: [[C_0:%.*]] = icmp sgt i32 [[X:%.*]], 0 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast [2 x i32]* [[STACK]] to i8* ; CHECK-NEXT: [[PTR_2_START:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[STACK]], i64 0, i64 0 ; CHECK-NEXT: call void @use.i8(i8* [[CAST_TO_REUSE]]) +; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[CAST_TO_REUSE]], i8* align 4 [[PTR_1_START1]], i64 8, i1 false) ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ] -; CHECK-NEXT: [[PTR_1:%.*]] = phi i32* [ [[PTR_1_START:%.*]], [[ENTRY]] ], [ [[PTR_1_NEXT:%.*]], [[LOOP]] ] +; CHECK-NEXT: [[PTR_1:%.*]] = phi i32* [ [[PTR_1_START]], [[ENTRY]] ], [ [[PTR_1_NEXT:%.*]], [[LOOP]] ] ; CHECK-NEXT: [[PTR_2:%.*]] = phi i32* [ [[PTR_2_START]], [[ENTRY]] ], [ [[PTR_2_NEXT:%.*]], [[LOOP]] ] ; CHECK-NEXT: [[PTR_1_NEXT]] = getelementptr inbounds i32, i32* [[PTR_1]], i64 1 ; CHECK-NEXT: [[LV:%.*]] = load i32, i32* [[PTR_1]], align 4 ; CHECK-NEXT: [[PTR_2_NEXT]] = getelementptr inbounds i32, i32* [[PTR_2]], i64 1 -; CHECK-NEXT: store i32 [[LV]], i32* [[PTR_2]], align 4 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i32 [[IV]], 1 ; CHECK-NEXT: [[C_1:%.*]] = icmp eq i32 [[IV]], 0 ; CHECK-NEXT: br i1 [[C_1]], label [[LOOP]], label [[EXIT:%.*]]