[all-commits] [llvm/llvm-project] e577f1: [InstCombine] Use `m_NotForbidPoison` when folding...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Fri Nov 1 07:19:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e577f14b670ee2ae6bb717133310b215be4331b3
      https://github.com/llvm/llvm-project/commit/e577f14b670ee2ae6bb717133310b215be4331b3
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-11-01 (Fri, 01 Nov 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/saturating-add-sub.ll

  Log Message:
  -----------
  [InstCombine] Use `m_NotForbidPoison` when folding `(X u< Y) ? -1 : (~X + Y) --> uadd.sat(~X, Y)` (#114345)

Alive2: https://alive2.llvm.org/ce/z/mTGCo-
We cannot reuse `~X` if `m_AllOnes` matches a vector constant with some
poison elts. An alternative solution is to create a new not instead of
reusing `~X`. But it doesn't worth the effort because we need to add a
one-use check.

Fixes https://github.com/llvm/llvm-project/issues/113869.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list