[llvm-commits] [llvm] r89601 - in /llvm/trunk: lib/Analysis/BasicAliasAnalysis.cpp test/Analysis/BasicAA/modref.ll
Chris Lattner
sabre at nondot.org
Sun Nov 22 08:15:59 PST 2009
Author: lattner
Date: Sun Nov 22 10:15:59 2009
New Revision: 89601
URL: http://llvm.org/viewvc/llvm-project?rev=89601&view=rev
Log:
remove a silly condition that doesn't make a lot of sense anymore.
Modified:
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
llvm/trunk/test/Analysis/BasicAA/modref.ll
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=89601&r1=89600&r2=89601&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Sun Nov 22 10:15:59 2009
@@ -275,11 +275,6 @@
//
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
Modified: llvm/trunk/test/Analysis/BasicAA/modref.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/modref.ll?rev=89601&r1=89600&r2=89601&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/BasicAA/modref.ll (original)
+++ llvm/trunk/test/Analysis/BasicAA/modref.ll Sun Nov 22 10:15:59 2009
@@ -90,3 +90,20 @@
ret void
; CHECK: ret void
}
+
+ at G1 = external global i32
+ at 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
+}
+
More information about the llvm-commits
mailing list