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

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 07:44:02 PDT 2022


nlopes added a comment.

In D123473#3442779 <https://reviews.llvm.org/D123473#3442779>, @fhahn wrote:

> In D123473#3442753 <https://reviews.llvm.org/D123473#3442753>, @nlopes wrote:
>
>> I think the patch is not the full fix, as far as I understand. It's a good improvement, perf & correctness wise, though, but doesn't fix #51248.
>>
>> There's one missing case: the load is needed and the function can't load memory (writeonly, readnone, etc?). In that case the optimization should bail out.
>
> I think at the moment, the load will only be generated if the source already had a load that is guaranteed to execute. So hoisting that in a write only function should be fine, as it is already UB.

OK then, thank you!
LGTM


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