[all-commits] [llvm/llvm-project] 5e7924: [SelectionDAG] Handle more opcodes in isGuaranteed...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Thu Aug 14 02:05:37 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e7924a3cb6103e6f8ed76f86fb784acd1f37df9
      https://github.com/llvm/llvm-project/commit/5e7924a3cb6103e6f8ed76f86fb784acd1f37df9
  Author: Björn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2025-08-14 (Thu, 14 Aug 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/X86/pr62286.ll

  Log Message:
  -----------
  [SelectionDAG] Handle more opcodes in isGuaranteedNotToBeUndefOrPoison (#147019)

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