[all-commits] [llvm/llvm-project] 7bbc04: [InstCombine] Consolidate another fold into select...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Dec 2 00:46:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7bbc049688a1586827d87ad8e2fc7cb3638ef2fc
      https://github.com/llvm/llvm-project/commit/7bbc049688a1586827d87ad8e2fc7cb3638ef2fc
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select-value-equivalence.ll

  Log Message:
  -----------
  [InstCombine] Consolidate another fold into select value equivalence (#117746)

We had a separate fold that handled just the trivial case where we're
replacing exactly the argument of the select. Handle this in select
value equivalence by relaxing the infinite loop protection to allow a
replacement of a non-constant with a constant.

This also fixes https://github.com/llvm/llvm-project/issues/113301, as
the separate fold did not handle undef values correctly.



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