Home
last modified time | relevance | path

Searched refs:UndefValue (Results 1 – 25 of 99) sorted by relevance

1234

/external/llvm/lib/Transforms/InstCombine/
DInstCombineVectorOps.cpp66 return UndefValue::get(VTy->getElementType()); in FindScalarElement()
91 return UndefValue::get(VTy->getElementType()); in FindScalarElement()
124 return ReplaceInstUsesWith(EI, UndefValue::get(EI.getType())); in visitExtractElementInst()
189 return ReplaceInstUsesWith(EI, UndefValue::get(EI.getType())); in visitExtractElementInst()
224 if (isa<UndefValue>(V)) { in CollectSingleShuffleElements()
225 Mask.assign(NumElts, UndefValue::get(Type::getInt32Ty(V->getContext()))); in CollectSingleShuffleElements()
252 if (isa<UndefValue>(ScalarOp)) { // inserting undef into vector. in CollectSingleShuffleElements()
257 Mask[InsertedIdx] = UndefValue::get(Type::getInt32Ty(V->getContext())); in CollectSingleShuffleElements()
303 if (isa<UndefValue>(V)) { in CollectShuffleElements()
304 Mask.assign(NumElts, UndefValue::get(Type::getInt32Ty(V->getContext()))); in CollectShuffleElements()
[all …]
DInstCombineCalls.cpp372 UndefValue::get(LHS->getType()), in visitCallInst()
386 UndefValue::get(LHS->getType()), in visitCallInst()
407 if (isa<UndefValue>(II->getArgOperand(1))) in visitCallInst()
408 return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); in visitCallInst()
414 UndefValue::get(II->getArgOperand(0)->getType()), in visitCallInst()
427 if (isa<UndefValue>(II->getArgOperand(0)) || in visitCallInst()
428 isa<UndefValue>(II->getArgOperand(1))) in visitCallInst()
429 return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); in visitCallInst()
435 UndefValue::get(II->getArgOperand(0)->getType()), in visitCallInst()
466 UndefValue::get(LHS->getType()), in visitCallInst()
[all …]
DInstCombineLoadStoreAlloca.cpp194 } else if (isa<UndefValue>(AI.getArraySize())) { in visitAllocaInst()
379 new StoreInst(UndefValue::get(LI.getType()), in visitLoadInst()
381 return ReplaceInstUsesWith(LI, UndefValue::get(LI.getType())); in visitLoadInst()
387 if (isa<UndefValue>(Op) || in visitLoadInst()
392 new StoreInst(UndefValue::get(LI.getType()), in visitLoadInst()
394 return ReplaceInstUsesWith(LI, UndefValue::get(LI.getType())); in visitLoadInst()
645 if (!isa<UndefValue>(Val)) { in visitStoreInst()
646 SI.setOperand(0, UndefValue::get(Val->getType())); in visitStoreInst()
654 if (isa<UndefValue>(Val)) in visitStoreInst()
DInstCombineSimplifyDemanded.cpp133 if (isa<UndefValue>(V)) in SimplifyDemandedUseBits()
135 return UndefValue::get(VTy); in SimplifyDemandedUseBits()
919 if (isa<UndefValue>(V)) { in SimplifyDemandedVectorElts()
927 return UndefValue::get(V->getType()); in SimplifyDemandedVectorElts()
940 Constant *Undef = UndefValue::get(EltTy); in SimplifyDemandedVectorElts()
953 if (isa<UndefValue>(Elt)) { // Already undef. in SimplifyDemandedVectorElts()
1082 Elts.push_back(UndefValue::get(Type::getInt32Ty(I->getContext()))); in SimplifyDemandedVectorElts()
1264 UndefValue::get(II->getType()), TmpV, in SimplifyDemandedVectorElts()
DInstCombinePHI.cpp685 return ReplaceInstUsesWith(FirstPhi, UndefValue::get(FirstPhi.getType())); in SliceUpIllegalIntegerPHI()
786 Value *Undef = UndefValue::get(FirstPhi.getType()); in SliceUpIllegalIntegerPHI()
819 return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); in visitPHINode()
831 return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); in visitPHINode()
/external/llvm/lib/IR/
DConstantFold.cpp511 if (isa<UndefValue>(V)) { in ConstantFoldCastInstruction()
518 return UndefValue::get(DestTy); in ConstantFoldCastInstruction()
718 if (isa<UndefValue>(Cond)) { in ConstantFoldSelectInstruction()
719 if (isa<UndefValue>(V1)) return V1; in ConstantFoldSelectInstruction()
722 if (isa<UndefValue>(V1)) return V2; in ConstantFoldSelectInstruction()
723 if (isa<UndefValue>(V2)) return V1; in ConstantFoldSelectInstruction()
742 if (isa<UndefValue>(Val)) // ee(undef, x) -> undef in ConstantFoldExtractElementInstruction()
743 return UndefValue::get(Val->getType()->getVectorElementType()); in ConstantFoldExtractElementInstruction()
747 if (isa<UndefValue>(Idx)) in ConstantFoldExtractElementInstruction()
748 return UndefValue::get(Val->getType()->getVectorElementType()); in ConstantFoldExtractElementInstruction()
[all …]
DConstants.cpp199 if (const UndefValue *UV = dyn_cast<UndefValue>(this)) in getAggregateElement()
688 UndefValue *UndefValue::getSequentialElement() const { in getSequentialElement()
689 return UndefValue::get(getType()->getSequentialElementType()); in getSequentialElement()
694 UndefValue *UndefValue::getStructElement(unsigned Elt) const { in getStructElement()
695 return UndefValue::get(getType()->getStructElementType(Elt)); in getStructElement()
700 UndefValue *UndefValue::getElementValue(Constant *C) const { in getElementValue()
708 UndefValue *UndefValue::getElementValue(unsigned Idx) const { in getElementValue()
755 if (isa<UndefValue>(C) && rangeOnlyContains(V.begin(), V.end(), C)) in get()
756 return UndefValue::get(Ty); in get()
878 isUndef = isa<UndefValue>(V[0]); in get()
[all …]
/external/llvm/lib/Transforms/IPO/
DIPConstantPropagation.cpp142 if (V == 0) V = UndefValue::get(AI->getType()); in PropagateConstantsIntoArguments()
173 RetVals.push_back(UndefValue::get(STy->getElementType(i))); in PropagateConstantReturn()
175 RetVals.push_back(UndefValue::get(F.getReturnType())); in PropagateConstantReturn()
195 if (isa<UndefValue>(V)) in PropagateConstantReturn()
200 if (isa<UndefValue>(RV)) { in PropagateConstantReturn()
/external/llvm/lib/Transforms/Scalar/
DSCCP.cpp230 if (!isa<UndefValue>(GV->getInitializer())) in TrackValueOfGlobalVariable()
379 if (!isa<UndefValue>(V)) in getValueState()
408 else if (isa<UndefValue>(Elt)) in getStructValueState()
955 markConstant(&I,ConstantExpr::getInsertElement(UndefValue::get(I.getType()), in visitInsertElementInst()
979 V1State.getConstant() : UndefValue::get(I.getType()); in visitShuffleVectorInst()
981 V2State.getConstant() : UndefValue::get(I.getType()); in visitShuffleVectorInst()
983 MaskState.getConstant() : UndefValue::get(I.getOperand(2)->getType()); in visitShuffleVectorInst()
1458 if (isa<UndefValue>(BI->getCondition())) { in ResolvedUndefsIn()
1480 if (isa<UndefValue>(SI->getCondition())) { in ResolvedUndefsIn()
1542 Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); in DeleteInstructionInBlock()
[all …]
DSimplifyCFGPass.cpp93 BBI->replaceAllUsesWith(UndefValue::get(BBI->getType())); in changeToUnreachable()
154 if (isa<UndefValue>(Ptr) || in markAliveBlocks()
167 if (isa<ConstantPointerNull>(Callee) || isa<UndefValue>(Callee)) { in markAliveBlocks()
DJumpThreading.cpp308 if (UndefValue *U = dyn_cast<UndefValue>(Val)) in getKnownConstant()
422 isa<UndefValue>(LHSVals[i].first)) { in ComputeValueKnownInPredecessors()
429 isa<UndefValue>(RHSVals[i].first)) { in ComputeValueKnownInPredecessors()
574 assert(isa<UndefValue>(Cond) && "Unexpected condition value"); in ComputeValueKnownInPredecessors()
703 if (isa<UndefValue>(Condition)) { in ProcessBlock()
859 if (AvailableVal == LI) AvailableVal = UndefValue::get(LI->getType()); in SimplifyPartiallyRedundantLoad()
1107 if (isa<UndefValue>(Val)) in ProcessThreadableEdges()
1251 if (isa<UndefValue>(XorOpValues[i].first)) in ProcessBranchOnXOR()
1272 !isa<UndefValue>(XorOpValues[i].first)) in ProcessBranchOnXOR()
1284 BO->replaceAllUsesWith(UndefValue::get(BO->getType())); in ProcessBranchOnXOR()
DLICM.cpp501 I.replaceAllUsesWith(UndefValue::get(I.getType())); in sink()
523 I.replaceAllUsesWith(UndefValue::get(I.getType())); in sink()
574 I.replaceAllUsesWith(UndefValue::get(I.getType())); in sink()
/external/llvm/include/llvm/IR/
DConstants.h1121 class UndefValue : public Constant {
1123 UndefValue(const UndefValue &) LLVM_DELETED_FUNCTION;
1125 explicit UndefValue(Type *T) : Constant(T, UndefValueVal, 0, 0) {}
1135 static UndefValue *get(Type *T);
1139 UndefValue *getSequentialElement() const;
1143 UndefValue *getStructElement(unsigned Elt) const;
1147 UndefValue *getElementValue(Constant *C) const;
1151 UndefValue *getElementValue(unsigned Idx) const;
/external/llvm/lib/Analysis/
DLint.cpp381 Assert1(!isa<UndefValue>(UnderlyingObject), in visitMemoryReference()
475 Assert1(!isa<UndefValue>(I.getOperand(0)) || in visitXor()
476 !isa<UndefValue>(I.getOperand(1)), in visitXor()
481 Assert1(!isa<UndefValue>(I.getOperand(0)) || in visitSub()
482 !isa<UndefValue>(I.getOperand(1)), in visitSub()
509 if (isa<UndefValue>(V)) return true; in isZero()
600 return UndefValue::get(V->getType()); in findValueImpl()
DMemoryBuiltins.cpp437 if (UndefValue *UV = dyn_cast<UndefValue>(V)) in compute()
600 SizeOffsetType ObjectSizeOffsetVisitor::visitUndefValue(UndefValue&) { in visitUndefValue() argument
776 OffsetPHI->replaceAllUsesWith(UndefValue::get(IntTy)); in visitPHINode()
778 SizePHI->replaceAllUsesWith(UndefValue::get(IntTy)); in visitPHINode()
DConstantFolding.cpp264 if (isa<ConstantAggregateZero>(C) || isa<UndefValue>(C)) in ReadDataFromGlobal()
429 return UndefValue::get(IntType); in FoldReinterpretLoadFromConstPtr()
519 if (isa<UndefValue>(GV->getInitializer())) in ConstantFoldLoadFromConstPtr()
520 return UndefValue::get(ResTy); in ConstantFoldLoadFromConstPtr()
826 if (isa<UndefValue>(Incoming)) in ConstantFoldInstruction()
844 return CommonValue ? CommonValue : UndefValue::get(PN->getType()); in ConstantFoldInstruction()
1454 if (isa<UndefValue>(Operands[0])) { in ConstantFoldCall()
1564 return UndefValue::get(Ty); in ConstantFoldCall()
1568 return UndefValue::get(Ty); in ConstantFoldCall()
DInstructionSimplify.cpp389 if (TV && isa<UndefValue>(TV)) in ThreadBinOpOverSelect()
391 if (FV && isa<UndefValue>(FV)) in ThreadBinOpOverSelect()
745 return UndefValue::get(Op0->getType()); in SimplifySubInst()
1210 return UndefValue::get(Op0->getType()); in SimplifyRem()
1317 return UndefValue::get(Op0->getType()); in SimplifyShift()
1861 if (LHS == RHS || isa<UndefValue>(RHS)) in SimplifyICmpInst()
2597 if (isa<UndefValue>(RHS)) // fcmp pred X, undef -> undef in SimplifyFCmpInst()
2598 return UndefValue::get(GetCompareTy(LHS)); in SimplifyFCmpInst()
2686 if (isa<UndefValue>(CondVal)) { // select undef, X, Y -> X or Y in SimplifySelectInst()
2691 if (isa<UndefValue>(TrueVal)) // select C, undef, X -> X in SimplifySelectInst()
[all …]
/external/llvm/lib/Transforms/Vectorize/
DBBVectorize.cpp677 if (!isa<UndefValue>(IENext->getOperand(0)) && in isPureIEChain()
1904 if (isa<UndefValue>(SI->getOperand(1))) in findBestDAGFor()
1936 if (isa<UndefValue>(SI->getOperand(1))) in findBestDAGFor()
2247 Mask[v+MaskOffset] = UndefValue::get(Type::getInt32Ty(Context)); in fillNewShuffleMask()
2313 UndefValue::get(ArgTypeL->getScalarType())); in expandIEChain()
2323 Value *LIEPrev = UndefValue::get(ArgTypeH); in expandIEChain()
2325 if (isa<UndefValue>(VectElemts[i])) continue; in expandIEChain()
2335 LOp = LIENext ? (Value*) LIENext : UndefValue::get(ArgTypeH); in expandIEChain()
2399 if (I2 == I1 || isa<UndefValue>(I2)) in getReplacementInput()
2418 if (!isa<UndefValue>(I4)) { in getReplacementInput()
[all …]
/external/llvm/lib/Target/R600/
DAMDGPUStructurizeCFG.cpp172 UndefValue *BoolUndef;
275 BoolUndef = UndefValue::get(Boolean); in doInitialization()
521 Value *Undef = UndefValue::get(Phi.getType()); in addPhiValues()
545 Value *Undef = UndefValue::get(Phi->getType()); in setPhiValues()
847 Value *Undef = UndefValue::get(II->getType()); in rebuildSSA()
DSIAnnotateControlFlow.cpp51 UndefValue *BoolUndef;
121 BoolUndef = UndefValue::get(Boolean); in doInitialization()
/external/llvm/lib/Transforms/Utils/
DSSAUpdater.cpp159 return UndefValue::get(ProtoType); in GetValueInMiddleOfBlock()
297 return UndefValue::get(Updater->ProtoType); in GetUndefVal()
486 if (NewVal == ALoad) NewVal = UndefValue::get(NewVal->getType()); in run()
DValueMapper.cpp164 if (isa<UndefValue>(C)) in MapValue()
165 return VM[V] = UndefValue::get(NewTy); in MapValue()
DLocal.cpp302 return isa<UndefValue>(II->getArgOperand(1)); in isInstructionTriviallyDead()
309 return C->isNullValue() || isa<UndefValue>(C); in isInstructionTriviallyDead()
388 I->replaceAllUsesWith(UndefValue::get(I->getType())); in RecursivelyDeleteDeadPHINode()
485 if (NewVal == PN) NewVal = UndefValue::get(PN->getType()); in MergeBasicBlockIntoOnlyPred()
998 Inst.replaceAllUsesWith(UndefValue::get(Inst.getType())); in removeUnreachableBlocks()
DPromoteMemoryToRegister.cpp551 Values[i] = UndefValue::get(Allocas[i]->getAllocatedType()); in run()
577 A->replaceAllUsesWith(UndefValue::get(A->getType())); in run()
668 Value *UndefVal = UndefValue::get(SomePHI->getType()); in run()
894 ReplVal = UndefValue::get(LI->getType()); in RewriteSingleStoreAlloca()
953 LI->replaceAllUsesWith(UndefValue::get(LI->getType())); in PromoteSingleBlockAlloca()
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp158 return UndefValue::get(Tp); in getRandomConstant()
191 return UndefValue::get(Tp); in getRandomValue()
202 return UndefValue::get(pickPointerType()); in getRandomPointerValue()
213 return UndefValue::get(pickVectorType()); in getRandomVectorValue()
444 CI = UndefValue::get(I32); in Act()

1234