[all-commits] [llvm/llvm-project] 047637: [SelectionDAG] Improve isGuaranteedNotToBeUndefOrP...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Fri Jul 4 01:41:33 PDT 2025


  Branch: refs/heads/users/bjope/prepare_2
  Home:   https://github.com/llvm/llvm-project
  Commit: 047637140f4348939f56c87274d82b597bcc6b79
      https://github.com/llvm/llvm-project/commit/047637140f4348939f56c87274d82b597bcc6b79
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2025-07-03 (Thu, 03 Jul 2025)

  Changed paths:
    M llvm/include/llvm/CodeGen/SelectionDAGNodes.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
    M llvm/test/CodeGen/X86/pr62286.ll

  Log Message:
  -----------
  [SelectionDAG] Improve isGuaranteedNotToBeUndefOrPoison

Add special handling of EXTRACT_SUBVECTOR, INSERT_SUBVECTOR,
EXTRACT_VECTOR_ELT, INSERT_VECTOR_ELT and SCALAR_TO_VECTOR in
isGuaranteedNotToBeUndefOrPoison. Make use of DemandedElts to
improve the analysis and only check relevant elements for each
operand.

Also start using DemandedElts in the recursive calls that
check isGuaranteedNotToBeUndefOrPoison for all operands for
operations that do not create undef/poison. We can do that for
a number of elementwise operations for which the DemandedElts
can be applied to every operand (e.g. ADD, OR, BITREVERSE, TRUNCATE).



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