13#ifndef LLVM_IR_GEPNOWRAPFLAGS_H
14#define LLVM_IR_GEPNOWRAPFLAGS_H
28 InBoundsFlag = (1 << 0),
36 "inbounds implies nusw");
44 : Flags(IsInBounds ? (InBoundsFlag | NUSWFlag) : 0) {}
47 static GEPNoWrapFlags
all() {
58 static GEPNoWrapFlags
fromRaw(
unsigned Flags) {
61 unsigned getRaw()
const {
return Flags; }
79 GEPNoWrapFlags Res = *
this &
Other;
90 GEPNoWrapFlags Res = *
this &
Other;
107 Flags &=
Other.Flags;
111 Flags |=
Other.Flags;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
GEPNoWrapFlags & operator|=(GEPNoWrapFlags Other)
static GEPNoWrapFlags inBounds()
GEPNoWrapFlags withoutNoUnsignedSignedWrap() const
bool operator==(GEPNoWrapFlags Other) const
GEPNoWrapFlags & operator&=(GEPNoWrapFlags Other)
GEPNoWrapFlags withoutInBounds() const
static GEPNoWrapFlags fromRaw(unsigned Flags)
static GEPNoWrapFlags all()
static GEPNoWrapFlags noUnsignedWrap()
static GEPNoWrapFlags noUnsignedSignedWrap()
GEPNoWrapFlags intersectForReassociate(GEPNoWrapFlags Other) const
Given (gep (gep p, x), y), determine the nowrap flags for (gep (gep, p, y), x).
GEPNoWrapFlags(bool IsInBounds)
bool hasNoUnsignedSignedWrap() const
bool operator!=(GEPNoWrapFlags Other) const
bool hasNoUnsignedWrap() const
GEPNoWrapFlags operator&(GEPNoWrapFlags Other) const
GEPNoWrapFlags operator|(GEPNoWrapFlags Other) const
GEPNoWrapFlags intersectForOffsetAdd(GEPNoWrapFlags Other) const
Given (gep (gep p, x), y), determine the nowrap flags for (gep p, x+y).
GEPNoWrapFlags withoutNoUnsignedWrap() const
static GEPNoWrapFlags none()
This is an optimization pass for GlobalISel generic memory operations.