[all-commits] [llvm/llvm-project] e506bf: [SDAG] Fix incorrect use of undef for boolean cont...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jun 1 06:19:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e506bfa7aedb4611db861b89d45d6ece53c42aae
      https://github.com/llvm/llvm-project/commit/e506bfa7aedb4611db861b89d45d6ece53c42aae
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/X86/avx512-insert-extract.ll
    M llvm/test/CodeGen/X86/setcc.ll

  Log Message:
  -----------
  [SDAG] Fix incorrect use of undef for boolean contents (PR63055)

FoldSetCC() returns UNDEF in a number of cases. However, the SetCC
result must follow BooleanContents. Unless the type is a
pre-legalization i1 or we have UndefinedBooleanContents, the use of
UNDEF will not uphold the requirement that the top bits are either
zero or match the low bit. In such cases, return zero instead.

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

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




More information about the All-commits mailing list