[PATCH] D157502: [LoopPredication] Rework assumes of widened conditions

Aleksandr Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 06:57:37 PDT 2023


aleksandr.popov created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
aleksandr.popov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently after widening br(WC && (C1 <https://reviews.llvm.org/C1> && C2)) we insert assume of
(C1 <https://reviews.llvm.org/C1> && C2) which is joined to WC by And operation.
But we are going to support more flexible form of widenable branches
where WC could be placed arbitrary in the expression tree, e.g:
br(C1 <https://reviews.llvm.org/C1> && (C2 && WC)).
In that case we won't have (C1 <https://reviews.llvm.org/C1> && C2) in the IR. So we need to add
explicit (C1 <https://reviews.llvm.org/C1> && C2) in the IR and then create an assumption of it.


https://reviews.llvm.org/D157502

Files:
  llvm/lib/Transforms/Scalar/LoopPredication.cpp
  llvm/test/Transforms/LoopPredication/basic_widenable_branch_guards.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157502.548605.patch
Type: text/x-patch
Size: 8332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230809/be6536ac/attachment.bin>


More information about the llvm-commits mailing list