13#ifndef LLVM_LIB_TARGET_LANAI_LANAIALUCODE_H
14#define LLVM_LIB_TARGET_LANAI_LANAIALUCODE_H
48 unsigned const OP_ENCODING_MASK = 0x07;
49 return AluOp & OP_ENCODING_MASK;
52inline static unsigned getAluOp(
unsigned AluOp) {
53 unsigned const ALU_MASK = 0x3F;
54 return AluOp & ALU_MASK;
62 assert(!
isPostOp(AluOp) &&
"Operator can't be a post- and pre-op");
67 assert(!
isPreOp(AluOp) &&
"Operator can't be a post- and pre-op");
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static bool isPreOp(unsigned AluOp)
static unsigned getAluOp(unsigned AluOp)
static const char * lanaiAluCodeToString(unsigned AluOp)
static unsigned makePostOp(unsigned AluOp)
static unsigned makePreOp(unsigned AluOp)
static unsigned encodeLanaiAluCode(unsigned AluOp)
static AluCode stringToLanaiAluCode(StringRef S)
static bool isPostOp(unsigned AluOp)
static bool modifiesOp(unsigned AluOp)
This is an optimization pass for GlobalISel generic memory operations.