[all-commits] [llvm/llvm-project] fdc0d5: [DAG] Do not call computeKnownBits from isKnownToB...

Jay Foad via All-commits all-commits at lists.llvm.org
Thu Apr 27 03:06:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fdc0d5f3999a48ea01ce3d642af57ee2ad39a3e7
      https://github.com/llvm/llvm-project/commit/fdc0d5f3999a48ea01ce3d642af57ee2ad39a3e7
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

  Log Message:
  -----------
  [DAG] Do not call computeKnownBits from isKnownToBeAPowerOfTwo

The only way known bits could help identify a known power of two is if
it knows exactly which power of two it is, i.e. if it is a known
constant. But in that case the value should have been simplified to a
constant already. So save some compile time by not calling
computeKnownBits.

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




More information about the All-commits mailing list