ΒΆllvm::APInt ScaleBitMask(
    const llvm::APInt& A,
    unsigned int NewBitWidth,
    bool MatchAllBits = false)

Description

Splat/Merge neighboring bits to widen/narrow the bitmask represented by MatchAnyBits: (Default) e.g. ScaleBitMask(0b0101, 8) -> 0b00110011 e.g. ScaleBitMask(0b00011011, 4) -> 0b0111 MatchAllBits: e.g. ScaleBitMask(0b0101, 8) -> 0b00110011 e.g. ScaleBitMask(0b00011011, 4) -> 0b0001 A.getBitwidth() or NewBitWidth must be a whole multiples of the other.

Declared at: llvm/include/llvm/ADT/APInt.h:2250

Parameters

const llvm::APInt& A
to
unsigned int NewBitWidth
bits.
bool MatchAllBits = false