[all-commits] [llvm/llvm-project] 10b44f: [InstCombine] Add KnownBits consistency assertion ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Nov 30 05:53:14 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 10b44fb6a38fd68b78933b89c3b6d8cff20485a8
      https://github.com/llvm/llvm-project/commit/10b44fb6a38fd68b78933b89c3b6d8cff20485a8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-11-30 (Thu, 30 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

  Log Message:
  -----------
  [InstCombine] Add KnownBits consistency assertion behind option (NFC)

I'm occasionally using this to find cases where computeKnownBits()
and SimplifyDemandedBits() went out of sync.

This option is not enabled by default (even under EXPENSIVE_CHECKS)
because it has a number of known failures in our tests. The reason
for this failures is that computeKnownBits() performs recursive
queries using the original context instruction, while
SimplifyDemandedBits() uses the current instruction. This is
something we can improve, but using the original context wouldn't
always be safe in this context (when non-speculatable instructions
are involved).




More information about the All-commits mailing list