[all-commits] [llvm/llvm-project] 17b4ca: [DAG] isSplatValue - only treat binop splats share...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Apr 15 00:34:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 17b4cacbd48b75a6a4c9dfe687dd39f5e88189c3
      https://github.com/llvm/llvm-project/commit/17b4cacbd48b75a6a4c9dfe687dd39f5e88189c3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2025-04-15 (Tue, 15 Apr 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-buildvec-of-binop.ll
    M llvm/test/CodeGen/X86/pr134602.ll

  Log Message:
  -----------
  [DAG] isSplatValue - only treat binop splats shared undef elements as undef (#135597)

#134602 demonstrated an issue where an AND node always had at least one demanded UNDEF element in either operand, and incorrectly reported this an all-undef result - despite the other element being 0 (so would correctly fold to 0).

This fix only assumes a binops splats element is undefined if both operands are undef.

Fixes #134602



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