Constant-fold a unary integer operation on Src.
Declared in <llvm/CodeGen/GlobalISel/Utils.h>
SmallVector<APInt>
ConstantFoldUnaryIntOp(
unsigned int Opcode,
LLT DstTy,
Register Src,
MachineRegisterInfo const& MRI);
Tries to constant fold a unary integer operation (G_CTLZ, G_CTTZ, G_CTPOP and their _ZERO_POISON variants, G_ABS, G_BSWAP, G_BITREVERSE) on Src. If Src is a vector then it tries to do an element-wise constant fold.
The folded element values.
| Name | Description |
|---|---|
| Opcode | Unary integer opcode to fold. |
| DstTy | Destination type of the operation. |
| Src | Source operand register. |
| MRI | Register information for the function. |