[all-commits] [llvm/llvm-project] 51a466: [InstCombine] Fix known bits handling in SimplifyD...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Mar 7 09:16:51 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 51a466a61f55a0e1111005911f06e6394a5057ca
      https://github.com/llvm/llvm-project/commit/51a466a61f55a0e1111005911f06e6394a5057ca
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-03-07 (Sat, 07 Mar 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    M llvm/test/Transforms/InstCombine/all-bits-shift.ll
    M llvm/test/Transforms/InstCombine/known-bits.ll

  Log Message:
  -----------
  [InstCombine] Fix known bits handling in SimplifyDemandedUseBits

Fixes a regression from D75801. SimplifyDemandedUseBits() is also
supposed to compute the known bits (of the demanded subset) of the
instruction. For unknown instructions it does so by directly calling
computeKnownBits(). For known instructions it will compute known
bits itself. However, for instructions where only some cases are
handled directly (e.g. a constant shift amount) the known bits
invocation for the unhandled case is sometimes missing. This patch
adds the missing calls and thus removes the main discrepancy with
ExpensiveCombines mode.

Differential Revision: https://reviews.llvm.org/D75804




More information about the All-commits mailing list