27 return CF->isZero() && CF->isNegative();
29 return CF->isZero() && !CF->isNegative();
45 return C->isMinusOne();
47 return C->isMaxValue(
true);
49 return C->isMinValue(
true);
51 return C->isMaxValue(
false);
53 return C->isMinValue(
false);
81 return C->isAllOnesValue();
85 return C->isMinValue(
true);
87 return C->isMaxValue(
true);
89 return C->isMinValue(
false);
91 return C->isMaxValue(
false);
106 if (isSaturating(RMWI) &&
115 "AtomicRMWs don't make sense with Unordered or NotAtomic");
131 if (!isIdempotentRMW(RMWI))
*p = old <signed v ? old : v
Instruction * visitAtomicRMWInst(AtomicRMWInst &SI)
This class represents lattice values for constants.
*p = old <unsigned v ? old : v
*p = old >unsigned v ? old : v
An instruction for reading from memory.
an instruction that atomically reads a memory location, combines it with another value, and then stores the result back.
*p = old >signed v ? old : v
void setAtomic(AtomicOrdering Ordering, SyncScope::ID SSID=SyncScope::System)
Sets the ordering constraint and the synchronization scope ID of this load instruction.
static Constant * getNegativeZero(Type *Ty)
bool isFloatingPointTy() const
Return true if this is one of the six floating-point types.
BinOp getOperation() const
Instruction * eraseInstFromFunction(Instruction &I)
Combiner aware instruction erasure.
bool isIntegerTy() const
True if this is an instance of IntegerType.
AtomicOrdering
Atomic ordering for LLVM's memory model.
Type * getType() const
All values are typed, get the type of this value.
An instruction for storing to memory.
SyncScope::ID getSyncScopeID() const
Returns the synchronization scope ID of this rmw instruction.
void setAlignment(MaybeAlign Align)
AtomicOrdering getOrdering() const
Returns the ordering constraint of this rmw instruction.
This is the shared class of boolean and integer constants.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
unsigned getABITypeAlignment(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
void setOperand(unsigned i, Value *Val)
void setOperation(BinOp Operation)
Value * getPointerOperand()
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file provides internal interfaces used to implement the InstCombine.
bool isVolatile() const
Return true if this is a RMW on a volatile memory location.