[all-commits] [llvm/llvm-project] 4e3491: [GuardWidening] Make sure widened condition operan...

Dmitry Makogon via All-commits all-commits at lists.llvm.org
Tue Feb 28 01:31:06 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e34915b6d27d950b18dea010303de05a0a18aef
      https://github.com/llvm/llvm-project/commit/4e34915b6d27d950b18dea010303de05a0a18aef
  Author: Dmitry Makogon <d.makogon at g.nsu.ru>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GuardWidening.cpp
    M llvm/test/Transforms/GuardWidening/widen-cond-with-operands.ll

  Log Message:
  -----------
  [GuardWidening] Make sure widened condition operands are available at insertion point

This fixes a possible issue when we could hoist an instruction up to a widenable
condition intrinsic call without making sure its operands are available at
hoisiting point.

Recently insertion point finding algorithm changed a bit, so this availability
check became necessary.

Verifier would crash after we handled the following special case:
  L >u C0 && L >u C1  ->  L >u max(C0, C1),
Previously we would insert the new condition right before the widenable condition
branch where all L operands were available.
Now we may choose the widenable condition intrinsic call as insertion point and it may
happen so that the L operands are computed after the call, so we have to make sure that
L operands are available at the point we want to insert it.

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


  Commit: 5ec368d7f4b93e692cea184d7f9f84d695e42fd8
      https://github.com/llvm/llvm-project/commit/5ec368d7f4b93e692cea184d7f9f84d695e42fd8
  Author: Dmitry Makogon <d.makogon at g.nsu.ru>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GuardWidening.cpp

  Log Message:
  -----------
  [GuardWidening] Rename 'isAvailableAt' -> 'canBeHoistedTo' (NFC)

This better describes what this method does.


Compare: https://github.com/llvm/llvm-project/compare/06faa47ecc56...5ec368d7f4b9


More information about the All-commits mailing list