34 case Intrinsic::log10:
39 case Intrinsic::copysign:
40 case Intrinsic::floor:
42 case Intrinsic::trunc:
44 case Intrinsic::nearbyint:
45 case Intrinsic::round:
46 case Intrinsic::bswap:
47 case Intrinsic::ctpop:
50 case Intrinsic::fmuladd:
63 unsigned ScalarOpdIdx) {
68 return (ScalarOpdIdx == 1);
90 return ValidIntrinsicID;
111 return ValidIntrinsicID;
123 ID == Intrinsic::lifetime_end || ID == Intrinsic::assume)
165 case LibFunc::log10f:
166 case LibFunc::log10l:
184 case LibFunc::copysign:
185 case LibFunc::copysignf:
186 case LibFunc::copysignl:
189 case LibFunc::floorf:
190 case LibFunc::floorl:
197 case LibFunc::truncf:
198 case LibFunc::truncl:
204 case LibFunc::nearbyint:
205 case LibFunc::nearbyintf:
206 case LibFunc::nearbyintl:
209 case LibFunc::roundf:
210 case LibFunc::roundl:
231 while (LastOperand > 1 &&
261 if (i != InductionOperand &&
272 if (CI && CI->
getType() == Ty) {
296 int64_t PtrAccessSize = 1;
316 if (OrigPtr == Ptr) {
319 if (
const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(V)) {
320 if (M->getOperand(0)->getSCEVType() !=
scConstant)
323 const APInt &APStepVal =
324 cast<SCEVConstant>(M->getOperand(0))->getValue()->getValue();
331 if (PtrAccessSize != StepVal)
333 V = M->getOperand(1);
338 Type *StripedOffRecurrenceCast =
nullptr;
340 StripedOffRecurrenceCast =
C->getType();
355 if (StripedOffRecurrenceCast)
369 return UndefValue::get(VTy->getElementType());
372 return C->getAggregateElement(EltNo);
376 if (!isa<ConstantInt>(III->getOperand(2)))
378 unsigned IIElt = cast<ConstantInt>(III->getOperand(2))->getZExtValue();
383 return III->getOperand(1);
392 int InEl = SVI->getMaskValue(EltNo);
394 return UndefValue::get(VTy->getElementType());
395 if (InEl < (
int)LHSWidth)
406 if (Elt->isNullValue())
Intrinsic::ID getIntrinsicIDForCall(CallInst *CI, const TargetLibraryInfo *TLI)
Returns intrinsic ID for call.
A parsed version of the target data layout string in and methods for querying it. ...
class_match< Value > m_Value()
Match an arbitrary value and ignore it.
Value * stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp)
If the argument is a GEP, then returns the operand identified by getGEPInductionOperand.
match_zero m_Zero()
Match an arbitrary zero/null constant.
unsigned getNumOperands() const
ScalarEvolution - This class is the main scalar evolution driver.
CallInst - This class represents a function call, abstracting a target machine's calling convention...
class_match< Constant > m_Constant()
Match an arbitrary Constant and ignore it.
const SCEV * getStepRecurrence(ScalarEvolution &SE) const
getStepRecurrence - This method constructs and returns the recurrence indicating how much this expres...
ShuffleVectorInst - This instruction constructs a fixed permutation of two input vectors.
bool isLoopInvariant(const SCEV *S, const Loop *L)
isLoopInvariant - Return true if the value of the given SCEV is unchanging in the specified loop...
BlockT * getHeader() const
SCEVCastExpr - This is the base class for unary cast operator classes.
StringRef getName() const
Return a constant reference to the value's name.
bool onlyReadsMemory() const
Determine if the call does not access or only reads memory.
bool match(Val *V, const Pattern &P)
This is the base class for all instructions that perform data casts.
Value * getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty)
If a value has only one user that is a CastInst, return it.
static void advance(T &it, size_t Val)
unsigned getNumArgOperands() const
getNumArgOperands - Return the number of call arguments.
bool isLoopInvariant(const Value *V) const
isLoopInvariant - Return true if the specified value is loop invariant
SCEVMulExpr - This node represents multiplication of some number of SCEVs.
BinaryOp_match< LHS, RHS, Instruction::Add > m_Add(const LHS &L, const RHS &R)
Value * getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp)
Get the stride of a pointer access in a loop.
SCEVAddRecExpr - This node represents a polynomial recurrence on the trip count of the specified loop...
bool isFloatingPointTy() const
isFloatingPointTy - Return true if this is one of the six floating point types
unsigned getNumElements() const
Return the number of elements in the Vector type.
Type * getElementType() const
PointerType - Class to represent pointers.
Value * findScalarElement(Value *V, unsigned EltNo)
Given a vector and an element number, see if the scalar value is already around as a register...
GetElementPtrInst - an instruction for type-safe pointer arithmetic to access elements of arrays and ...
bool getLibFunc(StringRef funcName, LibFunc::Func &F) const
Searches for a particular function name.
SCEVUnknown - This means that we are dealing with an entirely unknown SCEV value, and only represent ...
InsertElementInst - This instruction inserts a single (scalar) element into a VectorType value...
The instances of the Type class are immutable: once they are created, they are never changed...
bool isVectorTy() const
isVectorTy - True if this is an instance of VectorType.
This is an important base class in LLVM.
int64_t getSExtValue() const
Get sign extended value.
Intrinsic::ID checkUnaryFloatSignature(const CallInst &I, Intrinsic::ID ValidIntrinsicID)
Identify if call has a unary float signature It returns input intrinsic ID if call has a single argum...
unsigned getBitWidth() const
Return the number of bits in the APInt.
Value * getOperand(unsigned i) const
Constant * getAggregateElement(unsigned Elt) const
getAggregateElement - For aggregates (struct/array/vector) return the constant that corresponds to th...
LLVM_READONLY APFloat maxnum(const APFloat &A, const APFloat &B)
Implements IEEE maxNum semantics.
uint64_t getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
unsigned getVectorNumElements() const
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
Type * getType() const
All values are typed, get the type of this value.
Provides information about what library functions are available for the current target.
SequentialType * getType() const
Function * getCalledFunction() const
getCalledFunction - Return the function called, or null if this is an indirect function invocation...
bool hasVectorInstrinsicScalarOpd(Intrinsic::ID ID, unsigned ScalarOpdIdx)
Identifies if the intrinsic has a scalar operand.
Intrinsic::ID checkBinaryFloatSignature(const CallInst &I, Intrinsic::ID ValidIntrinsicID)
Identify if call has a binary float signature It returns input intrinsic ID if call has two arguments...
Value * getArgOperand(unsigned i) const
getArgOperand/setArgOperand - Return/set the i-th call argument.
VectorType - Class to represent vector types.
Class for arbitrary precision integers.
iterator_range< user_iterator > users()
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const Type * getScalarType() const LLVM_READONLY
getScalarType - If this is a vector type, return the element type, otherwise return 'this'...
unsigned getGEPInductionOperand(const GetElementPtrInst *Gep)
Find the operand of the GEP that should be checked for consecutive stores.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
bool isAggregateType() const
isAggregateType - Return true if the type is an aggregate type.
SCEV - This class represents an analyzed expression in the program.
bool hasLocalLinkage() const
LLVM Value Representation.
const SCEV * getSCEV(Value *V)
getSCEV - Return a SCEV expression for the full generality of the specified expression.
C - The default llvm calling convention, compatible with C.
LLVM_READONLY APFloat minnum(const APFloat &A, const APFloat &B)
Implements IEEE minNum semantics.
IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic functions.
gep_type_iterator gep_type_begin(const User *GEP)
bool isTriviallyVectorizable(Intrinsic::ID ID)
Identify if the intrinsic is trivially vectorizable.