ΒΆbool isKnownToBeAPowerOfTwo(
    llvm::Register Val,
    const llvm::MachineRegisterInfo& MRI,
    llvm::GISelKnownBits* KnownBits = nullptr)

Description

Test if the given value is known to have exactly one bit set. This differs from computeKnownBits in that it doesn't necessarily determine which bit is set.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/Utils.h:291

Parameters

llvm::Register Val
const llvm::MachineRegisterInfo& MRI
llvm::GISelKnownBits* KnownBits = nullptr