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
This commit is contained in:
Chris Lattner
2011-01-12 03:25:15 +00:00
parent 7d29ffbe5b
commit d318fc2ceb
2 changed files with 3 additions and 7 deletions

View File

@ -517,9 +517,6 @@ bool MemCpyOpt::processStore(StoreInst *SI, BasicBlock::iterator &BBI) {
} }
bool MemCpyOpt::processMemSet(MemSetInst *MSI, 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 // 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. // allows us to widen out the memset to do a single larger store.
if (isa<ConstantInt>(MSI->getLength()) && !MSI->isVolatile()) if (isa<ConstantInt>(MSI->getLength()) && !MSI->isVolatile())

View File

@ -202,10 +202,9 @@ entry:
%arrayidx = getelementptr inbounds i32* %P, i64 1 %arrayidx = getelementptr inbounds i32* %P, i64 1
store i32 0, i32* %arrayidx, align 4 store i32 0, i32* %arrayidx, align 4
ret void ret void
; FIXME: Disabled.
; CHECK: @test5 ; CHECK: @test5
; CHECK: store ; CHECK-NOT: store
; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false) ; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
} }
;; Memset followed by memset. ;; 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) tail call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 12, i32 1, i1 false)
ret void ret void
; CHECK: @test6 ; 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)
} }