[all-commits] [llvm/llvm-project] 1b8788: [LoopPredication] Rework assumes of widened condit...

Aleksandr Popov via All-commits all-commits at lists.llvm.org
Fri Aug 18 05:37:04 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b87882228b0371212753781a363d4addd1bafa7
  Author: Aleksandr Popov <a.popov.tmb at gmail.com>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopPredication.cpp
    M llvm/test/Transforms/LoopPredication/basic_widenable_branch_guards.ll

  Log Message:
  [LoopPredication] Rework assumes of widened conditions

Currently after widening br(WC && (c1 && c2)) we insert assume of
(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 && (c2 && WC)).
In that case we won't have (c1 && c2) in the IR. So we need to add
explicit (c1 && c2) and then create an assumption of it.

Reviewed By: anna

Differential Revision: https://reviews.llvm.org/D157502

More information about the All-commits mailing list