From d318fc2ceb9d5902277f6e3b0bd7b51b92f5d872 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 12 Jan 2011 03:25:15 +0000 Subject: [PATCH] revert 123144, reenabling the rest of memset formation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123302 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/MemCpyOptimizer.cpp | 3 --- test/Transforms/MemCpyOpt/form-memset.ll | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 41e10ba8581..0d3c5c7bdc9 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -517,9 +517,6 @@ bool MemCpyOpt::processStore(StoreInst *SI, BasicBlock::iterator &BBI) { } bool MemCpyOpt::processMemSet(MemSetInst *MSI, BasicBlock::iterator &BBI) { - // Temporarily disable this. - return false; - // See if there is another memset or store neighboring this memset which // allows us to widen out the memset to do a single larger store. if (isa(MSI->getLength()) && !MSI->isVolatile()) diff --git a/test/Transforms/MemCpyOpt/form-memset.ll b/test/Transforms/MemCpyOpt/form-memset.ll index 86fe6c4abd6..1ac97e9e6b9 100644 --- a/test/Transforms/MemCpyOpt/form-memset.ll +++ b/test/Transforms/MemCpyOpt/form-memset.ll @@ -202,10 +202,9 @@ entry: %arrayidx = getelementptr inbounds i32* %P, i64 1 store i32 0, i32* %arrayidx, align 4 ret void - ; FIXME: Disabled. ; CHECK: @test5 -; CHECK: store -; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false) +; CHECK-NOT: store +; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false) } ;; Memset followed by memset. @@ -218,6 +217,6 @@ entry: tail call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 12, i32 1, i1 false) ret void ; CHECK: @test6 -; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 24, i32 1, i1 false) +; CHECK: call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 24, i32 1, i1 false) }