struct MaskOps

Declaration

struct MaskOps { /* full declaration omitted */ };

Description

This is used by foldAnyOrAllBitsSet() to capture a source value (Root) and the bit indexes (Mask) needed by a masked compare. If we're matching a chain of 'and' ops, then we also need to capture the fact that we saw an "and X, 1", so that's an extra return value for that case.

Declared at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:207

Member Variables

public llvm::Value* Root = nullptr
public llvm::APInt Mask
public bool MatchAndChain
public bool FoundAnd1 = false

Method Overview

  • public MaskOps(unsigned int BitWidth, bool MatchAnds)

Methods

ΒΆMaskOps(unsigned int BitWidth, bool MatchAnds)

Declared at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:213

Parameters

unsigned int BitWidth
bool MatchAnds