Decompose an icmp into the form ((X & Mask) pred C) if possible.
Synopsis
Declared in <llvm/Analysis/CmpInstAnalysis.h>
std::optional<DecomposedBitTest>
decomposeBitTest(
Value* Cond,
bool LookThroughTrunc = true,
bool AllowNonZeroC = false,
bool DecomposeAnd = false);
Description
Unless AllowNonZeroC is true, C will always be 0. If DecomposeAnd is specified, then, for equality predicates, this will decompose bitmasking via and.
Return Value
Decomposed bit‐test form when possible; otherwise std::nullopt.
Parameters
Name |
Description |
Cond |
Condition value expected to be an icmp (possibly after casts). |
LookThroughTrunc |
When true, look through truncates on the operands. |
AllowNonZeroC |
When true, allow a non‐zero constant |
DecomposeAnd |
When true, decompose equality bitmasking via |
Created with MrDocs