1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

remove a silly condition that doesn't make a lot of sense anymore.

llvm-svn: 89601
This commit is contained in:
Chris Lattner 2009-11-22 16:15:59 +00:00
parent 59be5d3703
commit 632f60ccc9
2 changed files with 17 additions and 5 deletions

View File

@ -275,11 +275,6 @@ bool BasicAliasAnalysis::pointsToConstantMemory(const Value *P) {
//
AliasAnalysis::ModRefResult
BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
// Don't do anything smart for constant pointers.
// FIXME: WHY?
if (isa<Constant>(P))
return AliasAnalysis::getModRefInfo(CS, P, Size);
const Value *Object = P->getUnderlyingObject();
// If this is a tail call and P points to a stack location, we know that

View File

@ -90,3 +90,20 @@ define void @test3a(i8* %P, i8 %X) {
ret void
; CHECK: ret void
}
@G1 = external global i32
@G2 = external global [4000 x i32]
define i32 @test4(i8* %P, i8 %X) {
%tmp = load i32* @G1
call void @llvm.memset.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8 0, i32 4000, i32 1)
%tmp2 = load i32* @G1
%sub = sub i32 %tmp2, %tmp
ret i32 %sub
; CHECK: @test4
; CHECK: load i32* @G
; CHECK: memset.i32
; CHECK-NOT: load
; CHECK: sub i32 %tmp, %tmp
}