[all-commits] [llvm/llvm-project] 6bb86c: [SelectionDAG] Clear Known.One sign bit for ISD::F...

DeanSturtevant1 via All-commits all-commits at lists.llvm.org
Wed Sep 30 08:10:57 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bb86c2af2bad73178451aa3c8cb68eb4b837f96
      https://github.com/llvm/llvm-project/commit/6bb86c2af2bad73178451aa3c8cb68eb4b837f96
  Author: DeanSturtevant1 <dsturtevant at google.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp

  Log Message:
  -----------
  [SelectionDAG] Clear Known.One sign bit for ISD::FABS in computeKnownBits (#227457)

In `SelectionDAG::computeKnownBits`, `ISD::FABS` previously called
`Known.makeNonNegative()` after computing the known bits of its operand.
If the operand's sign bit was already known to be 1, `makeNonNegative()`
would only set `Known.Zero`'s sign bit without clearing `Known.One`'s
sign bit, resulting in a conflicting `KnownBits` state.

Explicitly set `Known.Zero`'s sign bit and clear `Known.One`'s sign bit
for `ISD::FABS`, and add a unit test.



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