38 case Intrinsic::objc_autorelease:
39 case Intrinsic::objc_autoreleasePoolPop:
40 case Intrinsic::objc_autoreleasePoolPush:
41 case Intrinsic::objc_autoreleaseReturnValue:
42 case Intrinsic::objc_claimAutoreleasedReturnValue:
43 case Intrinsic::objc_copyWeak:
44 case Intrinsic::objc_destroyWeak:
45 case Intrinsic::objc_initWeak:
46 case Intrinsic::objc_loadWeak:
47 case Intrinsic::objc_loadWeakRetained:
48 case Intrinsic::objc_moveWeak:
49 case Intrinsic::objc_release:
50 case Intrinsic::objc_retain:
51 case Intrinsic::objc_retainAutorelease:
52 case Intrinsic::objc_retainAutoreleaseReturnValue:
53 case Intrinsic::objc_retainAutoreleasedReturnValue:
54 case Intrinsic::objc_retainBlock:
55 case Intrinsic::objc_storeStrong:
56 case Intrinsic::objc_storeWeak:
57 case Intrinsic::objc_unsafeClaimAutoreleasedReturnValue:
58 case Intrinsic::objc_retainedObject:
59 case Intrinsic::objc_unretainedObject:
60 case Intrinsic::objc_unretainedPointer:
61 case Intrinsic::objc_retain_autorelease:
62 case Intrinsic::objc_sync_enter:
63 case Intrinsic::objc_sync_exit:
77 assert(MD &&
"First operand of DbgVariableIntrinsic should be non-null.");
102 assert(MD &&
"First operand of DbgVariableIntrinsic should be non-null.");
104 return AL->getArgs()[
OpIdx]->getValue();
109 "Attempted to get location operand from DbgVariableIntrinsic with none.");
111 assert(
OpIdx == 0 &&
"Operand Index must be 0 for a debug intrinsic with a "
112 "single location operand.");
113 return V->getValue();
127 auto ReplaceDbgAssignAddress = [
this, OldValue, NewValue]() ->
bool {
129 if (!DAI || OldValue != DAI->getAddress())
131 DAI->setAddress(NewValue);
134 bool DbgAssignAddrReplaced = ReplaceDbgAssignAddress();
135 (void)DbgAssignAddrReplaced;
137 assert(NewValue &&
"Values must be non-null");
139 auto OldIt =
find(Locations, OldValue);
140 if (OldIt == Locations.end()) {
141 if (AllowEmpty || DbgAssignAddrReplaced)
143 assert(DbgAssignAddrReplaced &&
144 "OldValue must be dbg.assign addr if unused in DIArgList");
148 assert(OldIt != Locations.end() &&
"OldValue must be a current location");
158 for (
auto *VMD : Locations)
186 "NewExpr for debug variable intrinsic does not reference every "
187 "location operand.");
193 for (
auto *VMD : NewValues)
201 return Fragment->SizeInBits;
208 return V->getValue();
278 MD = MAV->getMetadata();
284std::optional<fp::ExceptionBehavior>
290 MD = MAV->getMetadata();
360 auto ElemCount = VT->getElementCount();
368 "Unexpected VP intrinsic without mask operand");
369 return GetVectorLengthOfType(
getType());
371 return GetVectorLengthOfType(VPMask->
getType());
396std::optional<unsigned>
398 switch (IntrinsicID) {
402#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
403 case Intrinsic::VPID: \
405#include "llvm/IR/VPIntrinsics.def"
409std::optional<unsigned>
411 switch (IntrinsicID) {
415#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
416 case Intrinsic::VPID: \
418#include "llvm/IR/VPIntrinsics.def"
425 std::optional<unsigned> PtrParamOpt =
427 assert(PtrParamOpt &&
"no pointer argument!");
438std::optional<unsigned>
443 case Intrinsic::vp_store:
444 case Intrinsic::vp_scatter:
445 case Intrinsic::experimental_vp_strided_store:
447 case Intrinsic::vp_load:
448 case Intrinsic::vp_load_ff:
449 case Intrinsic::vp_gather:
450 case Intrinsic::experimental_vp_strided_load:
467 case Intrinsic::vp_store:
468 case Intrinsic::vp_scatter:
469 case Intrinsic::experimental_vp_strided_store:
478#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
479 case Intrinsic::VPID: \
481#include "llvm/IR/VPIntrinsics.def"
487 return ::isVPIntrinsic(
ID);
491constexpr static std::optional<unsigned>
496#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
497#define VP_PROPERTY_FUNCTIONAL_OPC(OPC) return Instruction::OPC;
498#define END_REGISTER_VP_INTRINSIC(VPID) break;
499#include "llvm/IR/VPIntrinsics.def"
504std::optional<unsigned>
506 return ::getFunctionalOpcodeForVP(
ID);
510constexpr static std::optional<Intrinsic::ID>
515#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
516#define VP_PROPERTY_FUNCTIONAL_INTRINSIC(INTRIN) return Intrinsic::INTRIN;
517#define END_REGISTER_VP_INTRINSIC(VPID) break;
518#include "llvm/IR/VPIntrinsics.def"
523std::optional<Intrinsic::ID>
525 return ::getFunctionalIntrinsicIDForVP(
ID);
532#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
533#define VP_PROPERTY_NO_FUNCTIONAL return true;
534#define END_REGISTER_VP_INTRINSIC(VPID) break;
535#include "llvm/IR/VPIntrinsics.def"
542#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) \
543 static_assert(doesVPHaveNoFunctionalEquivalent(Intrinsic::VPID) || \
544 getFunctionalOpcodeForVP(Intrinsic::VPID) || \
545 getFunctionalIntrinsicIDForVP(Intrinsic::VPID));
546#include "llvm/IR/VPIntrinsics.def"
549std::optional<Intrinsic::ID>
554#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
555#define VP_PROPERTY_CONSTRAINEDFP(CID) return Intrinsic::CID;
556#define END_REGISTER_VP_INTRINSIC(VPID) break;
557#include "llvm/IR/VPIntrinsics.def"
567#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) break;
568#define VP_PROPERTY_FUNCTIONAL_OPC(OPC) case Instruction::OPC:
569#define END_REGISTER_VP_INTRINSIC(VPID) return Intrinsic::VPID;
570#include "llvm/IR/VPIntrinsics.def"
582#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) break;
583#define VP_PROPERTY_FUNCTIONAL_INTRINSIC(INTRIN) case Intrinsic::INTRIN:
584#define END_REGISTER_VP_INTRINSIC(VPID) return Intrinsic::VPID;
585#include "llvm/IR/VPIntrinsics.def"
591 return ::getForIntrinsic(Id);
610 if (EC.isScalable()) {
614 return VScaleFactor >= EC.getKnownMinValue();
615 return (EC.getKnownMinValue() == 1) &&
match(VLParam,
m_VScale());
623 uint64_t VLNum = VLConst->getZExtValue();
624 if (VLNum >= EC.getKnownMinValue())
636 Type *OverloadTy = Params[0]->getType();
644 case Intrinsic::vp_trunc:
645 case Intrinsic::vp_sext:
646 case Intrinsic::vp_zext:
647 case Intrinsic::vp_fptoui:
648 case Intrinsic::vp_fptosi:
649 case Intrinsic::vp_uitofp:
650 case Intrinsic::vp_sitofp:
651 case Intrinsic::vp_fptrunc:
652 case Intrinsic::vp_fpext:
653 case Intrinsic::vp_ptrtoint:
654 case Intrinsic::vp_inttoptr:
655 case Intrinsic::vp_lrint:
656 case Intrinsic::vp_llrint:
657 case Intrinsic::vp_cttz_elts:
659 M, VPID, {ReturnType, Params[0]->getType()});
661 case Intrinsic::vp_is_fpclass:
664 case Intrinsic::vp_merge:
665 case Intrinsic::vp_select:
668 case Intrinsic::vp_load:
670 M, VPID, {ReturnType, Params[0]->getType()});
672 case Intrinsic::vp_load_ff:
674 M, VPID, {ReturnType->getStructElementType(0), Params[0]->getType()});
676 case Intrinsic::experimental_vp_strided_load:
678 M, VPID, {ReturnType, Params[0]->getType(), Params[1]->getType()});
680 case Intrinsic::vp_gather:
682 M, VPID, {ReturnType, Params[0]->getType()});
684 case Intrinsic::vp_store:
686 M, VPID, {Params[0]->getType(), Params[1]->getType()});
688 case Intrinsic::experimental_vp_strided_store:
691 {Params[0]->getType(), Params[1]->getType(), Params[2]->getType()});
693 case Intrinsic::vp_scatter:
695 M, VPID, {Params[0]->getType(), Params[1]->getType()});
698 assert(VPFunc &&
"Could not declare VP intrinsic");
704 case Intrinsic::vp_reduce_add:
705 case Intrinsic::vp_reduce_mul:
706 case Intrinsic::vp_reduce_and:
707 case Intrinsic::vp_reduce_or:
708 case Intrinsic::vp_reduce_xor:
709 case Intrinsic::vp_reduce_smax:
710 case Intrinsic::vp_reduce_smin:
711 case Intrinsic::vp_reduce_umax:
712 case Intrinsic::vp_reduce_umin:
713 case Intrinsic::vp_reduce_fmax:
714 case Intrinsic::vp_reduce_fmin:
715 case Intrinsic::vp_reduce_fmaximum:
716 case Intrinsic::vp_reduce_fminimum:
717 case Intrinsic::vp_reduce_fadd:
718 case Intrinsic::vp_reduce_fmul:
736 case Intrinsic::vp_fcmp:
737 case Intrinsic::vp_icmp:
746#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
747#define VP_PROPERTY_BINARYOP return true;
748#define END_REGISTER_VP_INTRINSIC(VPID) break;
749#include "llvm/IR/VPIntrinsics.def"
787std::optional<unsigned>
794std::optional<unsigned>
803 case Intrinsic::uadd_with_overflow:
804 case Intrinsic::sadd_with_overflow:
805 case Intrinsic::uadd_sat:
806 case Intrinsic::sadd_sat:
807 return Instruction::Add;
808 case Intrinsic::usub_with_overflow:
809 case Intrinsic::ssub_with_overflow:
810 case Intrinsic::usub_sat:
811 case Intrinsic::ssub_sat:
812 return Instruction::Sub;
813 case Intrinsic::umul_with_overflow:
814 case Intrinsic::smul_with_overflow:
815 return Instruction::Mul;
823 case Intrinsic::sadd_with_overflow:
824 case Intrinsic::ssub_with_overflow:
825 case Intrinsic::smul_with_overflow:
826 case Intrinsic::sadd_sat:
827 case Intrinsic::ssub_sat:
859 assert(InvokeBB &&
"safepoints should have unique landingpads");
861 "safepoint block should be well formed");
891 M, llvm::Intrinsic::experimental_convergence_anchor);
899 M, llvm::Intrinsic::experimental_convergence_entry);
909 M, llvm::Intrinsic::experimental_convergence_loop);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static ValueAsMetadata * getAsMetadata(Value *V)
Module.h This file contains the declarations for the Module class.
static constexpr std::optional< Intrinsic::ID > getFunctionalIntrinsicIDForVP(Intrinsic::ID ID)
static constexpr std::optional< unsigned > getFunctionalOpcodeForVP(Intrinsic::ID ID)
static ICmpInst::Predicate getIntPredicateFromMD(const Value *Op)
static constexpr bool doesVPHaveNoFunctionalEquivalent(Intrinsic::ID ID)
constexpr bool isVPIntrinsic(Intrinsic::ID ID)
static constexpr Intrinsic::ID getForIntrinsic(Intrinsic::ID Id)
static FCmpInst::Predicate getFPPredicateFromMD(const Value *Op)
MachineInstr unsigned OpIdx
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
Get the array size.
LLVM Basic Block Representation.
LLVM_ABI const_iterator getFirstInsertionPt() const
Returns an iterator to the first instruction in this block that is suitable for inserting a non-PHI i...
const Function * getParent() const
Return the enclosing method, or null if none.
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction; assumes that the block is well-formed.
LLVM_ABI const Module * getModule() const
Return the module owning the function this basic block belongs to, or nullptr if the function does no...
LLVM_ABI unsigned getNoWrapKind() const
Returns one of OBO::NoSignedWrap or OBO::NoUnsignedWrap.
LLVM_ABI bool isSigned() const
Whether the intrinsic is signed or unsigned.
LLVM_ABI Instruction::BinaryOps getBinaryOp() const
Returns the binary operation underlying the intrinsic.
MaybeAlign getParamAlign(unsigned ArgNo) const
Extract the alignment for a call or parameter (0=unknown).
Value * getArgOperand(unsigned i) const
void setArgOperand(unsigned i, Value *v)
unsigned arg_size() const
static CallInst * Create(FunctionType *Ty, Value *F, const Twine &NameStr="", InsertPosition InsertBefore=nullptr)
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
@ FCMP_OEQ
0 0 0 1 True if ordered and equal
@ ICMP_SLT
signed less than
@ ICMP_SLE
signed less or equal
@ FCMP_OLT
0 1 0 0 True if ordered and less than
@ FCMP_ULE
1 1 0 1 True if unordered, less than, or equal
@ FCMP_OGT
0 0 1 0 True if ordered and greater than
@ FCMP_OGE
0 0 1 1 True if ordered and greater than or equal
@ ICMP_UGE
unsigned greater or equal
@ ICMP_UGT
unsigned greater than
@ ICMP_SGT
signed greater than
@ FCMP_ULT
1 1 0 0 True if unordered or less than
@ FCMP_ONE
0 1 1 0 True if ordered and operands are unequal
@ FCMP_UEQ
1 0 0 1 True if unordered or equal
@ ICMP_ULT
unsigned less than
@ FCMP_UGT
1 0 1 0 True if unordered or greater than
@ FCMP_OLE
0 1 0 1 True if ordered and less than or equal
@ FCMP_ORD
0 1 1 1 True if ordered (no nans)
@ ICMP_SGE
signed greater or equal
@ FCMP_UNE
1 1 1 0 True if unordered or not equal
@ ICMP_ULE
unsigned less or equal
@ FCMP_UGE
1 0 1 1 True if unordered, greater than, or equal
@ FCMP_UNO
1 0 0 0 True if unordered: isnan(X) | isnan(Y)
This is the shared class of boolean and integer constants.
LLVM_ABI FCmpInst::Predicate getPredicate() const
LLVM_ABI std::optional< fp::ExceptionBehavior > getExceptionBehavior() const
LLVM_ABI std::optional< RoundingMode > getRoundingMode() const
LLVM_ABI unsigned getNonMetadataArgCount() const
static LLVM_ABI bool classof(const IntrinsicInst *I)
LLVM_ABI bool isDefaultFPEnvironment() const
Represents calls to the llvm.experimintal.convergence.* intrinsics.
static LLVM_ABI ConvergenceControlInst * CreateAnchor(BasicBlock &BB)
static LLVM_ABI ConvergenceControlInst * CreateLoop(BasicBlock &BB, ConvergenceControlInst *Parent)
static LLVM_ABI ConvergenceControlInst * CreateEntry(BasicBlock &BB)
static LLVM_ABI DIArgList * get(LLVMContext &Context, ArrayRef< ValueAsMetadata * > Args)
LLVM_ABI std::optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
LLVM_ABI void setValue(Value *V)
LLVM_ABI void setAssignId(DIAssignID *New)
LLVM_ABI void setKillAddress()
Kill the address component.
LLVM_ABI bool isKillAddress() const
Check whether this kills the address component.
Metadata * getRawAddress() const
LLVM_ABI Value * getAddress() const
LLVM_ABI void setAddress(Value *V)
LLVM_ABI iterator_range< location_op_iterator > location_ops() const
Get the locations corresponding to the variable referenced by the debug info intrinsic.
LLVM_ABI void addVariableLocationOps(ArrayRef< Value * > NewValues, DIExpression *NewExpr)
Adding a new location operand will always result in this intrinsic using an ArgList,...
LLVM_ABI void replaceVariableLocationOp(Value *OldValue, Value *NewValue, bool AllowEmpty=false)
LLVM_ABI Value * getVariableLocationOp(unsigned OpIdx) const
DILocalVariable * getVariable() const
unsigned getNumVariableLocationOps() const
void setOperand(unsigned i, Value *v)
LLVM_ABI std::optional< uint64_t > getFragmentSizeInBits() const
Get the size (in bits) of the variable, or fragment of the variable that is described.
DIExpression * getExpression() const
void setArgOperand(unsigned i, Value *v)
RawLocationWrapper getWrappedLocation() const
LLVM_ABI const Value * getStatepoint() const
The statepoint with which this gc.relocate is associated.
LLVM_ABI Value * getBasePtr() const
unsigned getBasePtrIndex() const
The index into the associate statepoint's argument list which contains the base pointer of the pointe...
LLVM_ABI Value * getDerivedPtr() const
unsigned getDerivedPtrIndex() const
The index into the associate statepoint's argument list which contains the pointer whose relocation t...
LLVM_ABI void setCallee(Value *Callee)
LLVM_ABI Value * getCallee() const
LLVM_ABI ConstantInt * getIndex() const
LLVM_ABI void setIndex(uint32_t Idx)
LLVM_ABI ConstantInt * getNumCounters() const
static bool classof(const IntrinsicInst *I)
LLVM_ABI Value * getStep() const
static bool classof(const IntrinsicInst *I)
LLVM_ABI const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
static LLVM_ABI bool mayLowerToFunctionCall(Intrinsic::ID IID)
Check if the intrinsic might lower into a regular function call in the course of IR transformations.
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
This is an important class for using LLVM in a threaded context.
A Module instance is used to store all the information related to an LLVM module.
static LLVM_ABI PoisonValue * get(Type *T)
Static factory methods - Return an 'poison' object of the specified type.
Metadata * getRawLocation() const
LLVM_ABI iterator_range< location_op_iterator > location_ops() const
Get the locations corresponding to the variable referenced by the debug info intrinsic.
LLVM_ABI Value * getVariableLocationOp(unsigned OpIdx) const
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
The instances of the Type class are immutable: once they are created, they are never changed.
static LLVM_ABI IntegerType * getInt64Ty(LLVMContext &C)
static LLVM_ABI IntegerType * getInt32Ty(LLVMContext &C)
static LLVM_ABI UndefValue * get(Type *T)
Static factory methods - Return an 'undef' object of the specified type.
unsigned getNumOperands() const
static LLVM_ABI bool isVPBinOp(Intrinsic::ID ID)
static LLVM_ABI bool isVPCast(Intrinsic::ID ID)
static LLVM_ABI bool isVPCmp(Intrinsic::ID ID)
LLVM_ABI CmpInst::Predicate getPredicate() const
static LLVM_ABI std::optional< unsigned > getMaskParamPos(Intrinsic::ID IntrinsicID)
LLVM_ABI bool canIgnoreVectorLengthParam() const
LLVM_ABI void setMaskParam(Value *)
static LLVM_ABI std::optional< unsigned > getFunctionalOpcodeForVP(Intrinsic::ID ID)
static LLVM_ABI std::optional< unsigned > getMemoryDataParamPos(Intrinsic::ID)
LLVM_ABI Value * getVectorLengthParam() const
static LLVM_ABI std::optional< Intrinsic::ID > getFunctionalIntrinsicIDForVP(Intrinsic::ID ID)
LLVM_ABI void setVectorLengthParam(Value *)
static LLVM_ABI std::optional< unsigned > getVectorLengthParamPos(Intrinsic::ID IntrinsicID)
static LLVM_ABI Intrinsic::ID getForOpcode(unsigned OC)
The llvm.vp.* intrinsics for this instruction Opcode.
static LLVM_ABI Function * getOrInsertDeclarationForParams(Module *M, Intrinsic::ID, Type *ReturnType, ArrayRef< Value * > Params)
Declares a llvm.vp.
static LLVM_ABI std::optional< unsigned > getMemoryPointerParamPos(Intrinsic::ID)
static LLVM_ABI bool isVPIntrinsic(Intrinsic::ID)
LLVM_ABI Value * getMemoryDataParam() const
static LLVM_ABI Intrinsic::ID getForIntrinsic(Intrinsic::ID Id)
The llvm.vp.
LLVM_ABI Value * getMemoryPointerParam() const
LLVM_ABI MaybeAlign getPointerAlignment() const
LLVM_ABI Value * getMaskParam() const
LLVM_ABI ElementCount getStaticVectorLength() const
static LLVM_ABI std::optional< Intrinsic::ID > getConstrainedIntrinsicIDForVP(Intrinsic::ID ID)
static LLVM_ABI bool isVPReduction(Intrinsic::ID ID)
LLVM_ABI unsigned getStartParamPos() const
LLVM_ABI unsigned getVectorParamPos() const
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
LLVMContext & getContext() const
All values hold a context through their type.
A range adaptor for a pair of iterators.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
LLVM_ABI bool hasConstrainedFPRoundingModeOperand(ID QID)
Returns true if the intrinsic ID is for one of the "ConstrainedFloating-Point Intrinsics" that take r...
LLVM_ABI Function * getOrInsertDeclaration(Module *M, ID id, ArrayRef< Type * > OverloadTys={})
Look up the Function declaration of the intrinsic id in the Module M.
LLVM_ABI bool isConstrainedFPIntrinsic(ID QID)
Returns true if the intrinsic ID is for one of the "ConstrainedFloating-Point Intrinsics".
bool match(Val *V, const Pattern &P)
IntrinsicID_match m_VScale()
Matches a call to llvm.vscale().
BinaryOp_match< LHS, RHS, Instruction::Mul > m_Mul(const LHS &L, const RHS &R)
auto m_ConstantInt()
Match an arbitrary ConstantInt and ignore it.
@ ebIgnore
This corresponds to "fpexcept.ignore".
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
OperandBundleDefT< Value * > OperandBundleDef
LLVM_ABI std::optional< fp::ExceptionBehavior > convertStrToExceptionBehavior(StringRef)
Returns a valid ExceptionBehavior enumerator when given a string valid as input in constrained intrin...
DWARFExpression::Operation Op
@ NearestTiesToEven
roundTiesToEven.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI std::optional< RoundingMode > convertStrToRoundingMode(StringRef)
Returns a valid RoundingMode enumerator when given a string that is valid as input in constrained int...
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.