[DAG] Do not call computeKnownBits from isKnownToBeAPowerOfTwo
authorJay Foad <jay.foad@amd.com>
Thu, 27 Apr 2023 08:33:24 +0000 (09:33 +0100)
committerJay Foad <jay.foad@amd.com>
Thu, 27 Apr 2023 10:05:56 +0000 (11:05 +0100)
commitfdc0d5f3999a48ea01ce3d642af57ee2ad39a3e7
tree3eec98bb9a02c9ca06ea61bd4d6b26f40e6e6694
parent6cf14a72390f0914b18f30f2f357b783ff84533c
[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
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp