[PATCH] D65402: [Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 04:47:07 PDT 2019


xbolva00 added a comment.

Hi,

So with this patch and enabled Attributor I expect that arguments will be annotated with dereferenceable(16) (propagated from callsite), right?

My IR:

define dso_local void @alias(i8* nocapture %s, i8* nocapture %p) local_unnamed_addr #0 {
entry:

  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias align 1 dereferenceable(16) %s, i8* noalias align 1 dereferenceable(16) %p, i64 16, i1 false)
  %0 = load i8, i8* %s, align 1, !tbaa !2
  %arrayidx = getelementptr inbounds i8, i8* %p, i64 3
  store i8 %0, i8* %arrayidx, align 1, !tbaa !2
  %1 = load i8, i8* %s, align 1, !tbaa !2
  %arrayidx1 = getelementptr inbounds i8, i8* %p, i64 4
  store i8 %1, i8* %arrayidx1, align 1, !tbaa !2
  ret void

}


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65402/new/

https://reviews.llvm.org/D65402





More information about the llvm-commits mailing list