[PATCH] D86816: [LoopDelete][Assume] Allow deleting loops with assumes

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 17:08:54 PDT 2020


jdoerfert added a comment.

In D86816#2245688 <https://reviews.llvm.org/D86816#2245688>, @efriedma wrote:

> Should mayWriteToMemory/mayHaveSideEffects be true for llvm.assume?  It can't have any side-effects, really; at most, it has undefined behavior.
>
> Of course, if we added readonly to llvm.assume, we'd have to be careful that transforms don't accidentally throw away llvm.assume operations.  But that seems solvable.

The problem is it is control dependent. Maybe our shift towards speculatable has made it possible that possible UB is strong enough for assume. That would be cool. I haven't thought about this, we should.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86816



More information about the llvm-commits mailing list