[PATCH] D20775: [CFLAA] Remove redundant aliasing relation between GEP indices and GEP result
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Tue May 31 13:01:39 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271322: [CFLAA] Don't link GEP pointers to GEP indices. (authored by gbiv).
Changed prior to commit:
http://reviews.llvm.org/D20775?vs=58994&id=59114#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20775
Files:
llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
llvm/trunk/test/Analysis/CFLAliasAnalysis/gep-index-no-alias.ll
Index: llvm/trunk/test/Analysis/CFLAliasAnalysis/gep-index-no-alias.ll
===================================================================
--- llvm/trunk/test/Analysis/CFLAliasAnalysis/gep-index-no-alias.ll
+++ llvm/trunk/test/Analysis/CFLAliasAnalysis/gep-index-no-alias.ll
@@ -0,0 +1,14 @@
+; This testcase ensures that gep result does not alias gep indices
+
+; RUN: opt < %s -disable-basicaa -cfl-aa -aa-eval -print-no-aliases -disable-output 2>&1 | FileCheck %s
+; RUN: opt < %s -aa-pipeline=cfl-aa -passes=aa-eval -print-no-aliases -disable-output 2>&1 | FileCheck %s
+
+; CHECK: Function: foo
+; CHECK: [2 x i32]* %a, [2 x i32]* %b
+define void @foo(i32 %n) {
+ %a = alloca [2 x i32], align 4
+ %b = alloca [2 x i32], align 4
+ %c = getelementptr inbounds [2 x i32], [2 x i32]* %a, i32 0, i32 %n
+ %d = getelementptr inbounds [2 x i32], [2 x i32]* %b, i32 0, i32 %n
+ ret void
+}
Index: llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
===================================================================
--- llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
+++ llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
@@ -209,8 +209,6 @@
void visitGetElementPtrInst(GetElementPtrInst &Inst) {
auto *Op = Inst.getPointerOperand();
Output.push_back(Edge(&Inst, Op, EdgeType::Assign, AttrNone));
- for (auto I = Inst.idx_begin(), E = Inst.idx_end(); I != E; ++I)
- Output.push_back(Edge(&Inst, *I, EdgeType::Assign, AttrNone));
}
void visitSelectInst(SelectInst &Inst) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20775.59114.patch
Type: text/x-patch
Size: 1489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160531/39746008/attachment.bin>
More information about the llvm-commits
mailing list