[PATCH] D46972: Propagate nonnull and dereferenceable throught launder

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 17:25:19 PDT 2018


Prazek added a comment.

In https://reviews.llvm.org/D46972#1102314, @hfinkel wrote:

> I also think that this is fine. Regarding hoisting, will we hoist the intrinsic itself or is further work necessary to enable that?




  define void @foo(i8* %ptr) {
  entry:
    br label %loop
   
  loop:
    %x = phi i8 [ 0, %entry ], [ %x.inc, %loop ]
    %p = call i8* @llvm.launder.invariant.group.p0i8(i8* %ptr)
    %val = load i8, i8* %p
    %x.inc = add i8 %x, %val
    br label %loop
  }

is not curently hoisted by LICM, so I guess we will have to fix it. 
But I have working patch for hoisting invariant.group loads:
https://reviews.llvm.org/D45151


Repository:
  rL LLVM

https://reviews.llvm.org/D46972





More information about the llvm-commits mailing list