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);
66 return !CF->isNegative() && CF->isInfinity();
69 return CF->isNegative() && CF->isInfinity();
87 return C->isAllOnesValue();
91 return C->isMinValue(
true);
93 return C->isMaxValue(
true);
95 return C->isMinValue(
false);
97 return C->isMaxValue(
false);
119 "AtomicRMWs don't make sense with Unordered or NotAtomic");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool isIdempotentRMW(AtomicRMWInst &RMWI)
Return true if and only if the given instruction does not modify the memory location referenced.
static bool isSaturating(AtomicRMWInst &RMWI)
Return true if the given instruction always produces a value in memory equivalent to its value operan...
This file provides internal interfaces used to implement the InstCombine.
an instruction that atomically reads a memory location, combines it with another value,...
bool isVolatile() const
Return true if this is a RMW on a volatile memory location.
@ Min
*p = old <signed v ? old : v
@ Max
*p = old >signed v ? old : v
@ UMin
*p = old <unsigned v ? old : v
@ FMin
*p = minnum(old, v) minnum matches the behavior of llvm.minnum.
@ UMax
*p = old >unsigned v ? old : v
@ FMax
*p = maxnum(old, v) maxnum matches the behavior of llvm.maxnum.
void setOperation(BinOp Operation)
BinOp getOperation() const
AtomicOrdering getOrdering() const
Returns the ordering constraint of this rmw instruction.
static Constant * getNegativeZero(Type *Ty)
Instruction * visitAtomicRMWInst(AtomicRMWInst &SI)
Instruction * replaceOperand(Instruction &I, unsigned OpNum, Value *V)
Replace operand of instruction and add old operand to the worklist.
bool isFloatingPointTy() const
Return true if this is one of the floating-point types.
bool isIntegerTy() const
True if this is an instance of IntegerType.
Type * getType() const
All values are typed, get the type of this value.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.