[PATCH] D123473: [LICM] Only create load in pre-header when promoting load.

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 06:42:19 PDT 2022


aqjune added a comment.

In D123473#3484702 <https://reviews.llvm.org/D123473#3484702>, @reames wrote:

> I don't think we actually want to do that.  Instead, I think we're making a mistake by considering the load to be immediate UB as opposed to simply returning poison in this case.

If there is a transformation that turns load in a writeonly function into unreachable, defining it as UB would be necessary.
However, my guess is that existing optimizations won't be that aggressive; perhaps for existing opts, poison might be enough. This is still my guess, though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123473



More information about the llvm-commits mailing list