[PATCH] D141164: [AAUnderlyingObjects] Introduce an AA for getting underlying objects of a pointer
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 8 12:17:31 PST 2023
jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.
LG
================
Comment at: llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll:2100
define i8 @phi_store() {
-; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
-; TUNIT-LABEL: define {{[^@]+}}@phi_store
-; TUNIT-SAME: () #[[ATTR3]] {
-; TUNIT-NEXT: entry:
-; TUNIT-NEXT: [[A:%.*]] = alloca i16, align 2
-; TUNIT-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8*
-; TUNIT-NEXT: br label [[LOOP:%.*]]
-; TUNIT: loop:
-; TUNIT-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; TUNIT-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; TUNIT-NEXT: store i8 1, i8* [[P]], align 1
-; TUNIT-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
-; TUNIT-NEXT: [[O]] = add nsw i8 [[I]], 1
-; TUNIT-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
-; TUNIT-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; TUNIT: end:
-; TUNIT-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
-; TUNIT-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
-; TUNIT-NEXT: ret i8 [[L]]
-;
-; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
-; CGSCC-LABEL: define {{[^@]+}}@phi_store
-; CGSCC-SAME: () #[[ATTR5]] {
-; CGSCC-NEXT: entry:
-; CGSCC-NEXT: [[A:%.*]] = alloca i16, align 2
-; CGSCC-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8*
-; CGSCC-NEXT: br label [[LOOP:%.*]]
-; CGSCC: loop:
-; CGSCC-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; CGSCC-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; CGSCC-NEXT: store i8 1, i8* [[P]], align 1
-; CGSCC-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
-; CGSCC-NEXT: [[O]] = add nsw i8 [[I]], 1
-; CGSCC-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
-; CGSCC-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; CGSCC: end:
-; CGSCC-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
-; CGSCC-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
-; CGSCC-NEXT: ret i8 [[L]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn memory(none)
+; CHECK-LABEL: define {{[^@]+}}@phi_store
----------------
tianshilei1992 wrote:
> tianshilei1992 wrote:
> > I might want to update the test case first w/o my changes.
> It looks like the merge of two check lines is indeed introduced in this patch.
We know realize it's readnone, that's a good thing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141164/new/
https://reviews.llvm.org/D141164
More information about the llvm-commits
mailing list