invariant.group.launder should not stop propagation
of nonnull and dereferenceable, because e.g. we would not be
able to hoist loads speculatively.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 18208 Build 18208: arc lint + arc unit
Event Timeline
Comment Actions
I also think that this is fine. Regarding hoisting, will we hoist the intrinsic itself or is further work necessary to enable that?
Comment Actions
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