llvm.org GIT mirror llvm / d318fc2
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 Chris Lattner 8 years ago
2 changed file(s) with 5 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
516516 }
517517
518518 bool MemCpyOpt::processMemSet(MemSetInst *MSI, BasicBlock::iterator &BBI) {
519 // Temporarily disable this.
520 return false;
521
522519 // See if there is another memset or store neighboring this memset which
523520 // allows us to widen out the memset to do a single larger store.
524521 if (isa(MSI->getLength()) && !MSI->isVolatile())
201201 %arrayidx = getelementptr inbounds i32* %P, i64 1
202202 store i32 0, i32* %arrayidx, align 4
203203 ret void
204 ; FIXME: Disabled.
205204 ; CHECK: @test5
206 ; CHECK: store
207 ; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
205 ; CHECK-NOT: store
206 ; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
208207 }
209208
210209 ;; Memset followed by memset.
217216 tail call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 12, i32 1, i1 false)
218217 ret void
219218 ; CHECK: @test6
220 ; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 24, i32 1, i1 false)
221 }
222
219 ; CHECK: call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 24, i32 1, i1 false)
220 }
221