Home
last modified time | relevance | path

Searched refs:ConstantExpr (Results 1 – 25 of 430) sorted by relevance

12345678910>>...18

/external/swiftshader/third_party/llvm-7.0/llvm/unittests/IR/
DConstantsTest.cpp35 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One)); in TEST()
39 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One)); in TEST()
43 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne)); in TEST()
47 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One)); in TEST()
51 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne)); in TEST()
55 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One)); in TEST()
59 EXPECT_EQ(Undef, ConstantExpr::getShl(One, One)); in TEST()
63 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero)); in TEST()
67 EXPECT_EQ(Undef, ConstantExpr::getLShr(One, One)); in TEST()
71 EXPECT_EQ(Undef, ConstantExpr::getAShr(One, One)); in TEST()
[all …]
/external/llvm/unittests/IR/
DConstantsTest.cpp35 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One)); in TEST()
39 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One)); in TEST()
43 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne)); in TEST()
47 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One)); in TEST()
51 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne)); in TEST()
55 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One)); in TEST()
59 EXPECT_EQ(Undef, ConstantExpr::getShl(One, One)); in TEST()
63 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero)); in TEST()
67 EXPECT_EQ(Undef, ConstantExpr::getLShr(One, One)); in TEST()
71 EXPECT_EQ(Undef, ConstantExpr::getAShr(One, One)); in TEST()
[all …]
/external/swiftshader/third_party/LLVM/include/llvm/Support/
DConstantFolder.h36 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW);
39 return ConstantExpr::getFAdd(LHS, RHS); in CreateFAdd()
43 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW);
46 return ConstantExpr::getFSub(LHS, RHS); in CreateFSub()
50 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW);
53 return ConstantExpr::getFMul(LHS, RHS); in CreateFMul()
57 return ConstantExpr::getUDiv(LHS, RHS, isExact);
61 return ConstantExpr::getSDiv(LHS, RHS, isExact);
64 return ConstantExpr::getFDiv(LHS, RHS); in CreateFDiv()
67 return ConstantExpr::getURem(LHS, RHS); in CreateURem()
[all …]
DTargetFolder.h37 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) in Fold()
52 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW));
55 return Fold(ConstantExpr::getFAdd(LHS, RHS)); in CreateFAdd()
59 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW));
62 return Fold(ConstantExpr::getFSub(LHS, RHS)); in CreateFSub()
66 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW));
69 return Fold(ConstantExpr::getFMul(LHS, RHS)); in CreateFMul()
72 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact));
75 return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact));
78 return Fold(ConstantExpr::getFDiv(LHS, RHS)); in CreateFDiv()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/IR/
DConstantFolder.h38 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW);
42 return ConstantExpr::getFAdd(LHS, RHS); in CreateFAdd()
47 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW);
51 return ConstantExpr::getFSub(LHS, RHS); in CreateFSub()
56 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW);
60 return ConstantExpr::getFMul(LHS, RHS); in CreateFMul()
65 return ConstantExpr::getUDiv(LHS, RHS, isExact);
70 return ConstantExpr::getSDiv(LHS, RHS, isExact);
74 return ConstantExpr::getFDiv(LHS, RHS); in CreateFDiv()
78 return ConstantExpr::getURem(LHS, RHS); in CreateURem()
[all …]
DOperator.h44 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
52 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
58 static bool classof(const ConstantExpr *) { return true; } in classof() argument
60 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof()
76 friend class ConstantExpr; variable
106 static bool classof(const ConstantExpr *CE) { in classof()
114 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
128 friend class ConstantExpr; variable
147 static bool classof(const ConstantExpr *CE) { in classof()
155 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
[all …]
/external/llvm/include/llvm/IR/
DConstantFolder.h36 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW);
39 return ConstantExpr::getFAdd(LHS, RHS); in CreateFAdd()
43 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW);
46 return ConstantExpr::getFSub(LHS, RHS); in CreateFSub()
50 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW);
53 return ConstantExpr::getFMul(LHS, RHS); in CreateFMul()
57 return ConstantExpr::getUDiv(LHS, RHS, isExact);
61 return ConstantExpr::getSDiv(LHS, RHS, isExact);
64 return ConstantExpr::getFDiv(LHS, RHS); in CreateFDiv()
67 return ConstantExpr::getURem(LHS, RHS); in CreateURem()
[all …]
DOperator.h28 class ConstantExpr; variable
51 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
59 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
65 static inline bool classof(const ConstantExpr *) { return true; } in classof() argument
67 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof()
83 friend class ConstantExpr; variable
112 static inline bool classof(const ConstantExpr *CE) { in classof()
120 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
134 friend class ConstantExpr; variable
151 static inline bool classof(const ConstantExpr *CE) { in classof()
[all …]
/external/llvm/include/llvm/Analysis/
DTargetFolder.h37 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) in Fold()
52 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW));
55 return Fold(ConstantExpr::getFAdd(LHS, RHS)); in CreateFAdd()
59 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW));
62 return Fold(ConstantExpr::getFSub(LHS, RHS)); in CreateFSub()
66 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW));
69 return Fold(ConstantExpr::getFMul(LHS, RHS)); in CreateFMul()
72 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact));
75 return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact));
78 return Fold(ConstantExpr::getFDiv(LHS, RHS)); in CreateFDiv()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Analysis/
DTargetFolder.h51 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW));
54 return Fold(ConstantExpr::getFAdd(LHS, RHS)); in CreateFAdd()
58 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW));
61 return Fold(ConstantExpr::getFSub(LHS, RHS)); in CreateFSub()
65 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW));
68 return Fold(ConstantExpr::getFMul(LHS, RHS)); in CreateFMul()
71 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact));
74 return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact));
77 return Fold(ConstantExpr::getFDiv(LHS, RHS)); in CreateFDiv()
80 return Fold(ConstantExpr::getURem(LHS, RHS)); in CreateURem()
[all …]
/external/swiftshader/third_party/LLVM/unittests/VMCore/
DConstantsTest.cpp28 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One)); in TEST()
32 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One)); in TEST()
36 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne)); in TEST()
40 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One)); in TEST()
44 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne)); in TEST()
48 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One)); in TEST()
52 EXPECT_EQ(Undef, ConstantExpr::getShl(One, One)); in TEST()
56 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero)); in TEST()
60 EXPECT_EQ(Undef, ConstantExpr::getLShr(One, One)); in TEST()
64 EXPECT_EQ(Undef, ConstantExpr::getAShr(One, One)); in TEST()
[all …]
/external/swiftshader/third_party/LLVM/include/llvm/
DOperator.h25 class ConstantExpr; variable
45 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
54 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
61 static inline bool classof(const ConstantExpr *) { return true; } in classof() argument
63 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof()
82 friend class ConstantExpr; variable
112 static inline bool classof(const ConstantExpr *CE) { in classof()
120 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
133 friend class ConstantExpr; variable
153 static inline bool classof(const ConstantExpr *CE) { in classof()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/IR/
DConstantFold.cpp63 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i)); in BitCastConstantVector()
64 C = ConstantExpr::getBitCast(C, DstEltTy); in BitCastConstantVector()
78 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair()
133 return ConstantExpr::getInBoundsGetElementPtr(PTy->getElementType(), in FoldBitCast()
156 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
233 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes()
251 return ConstantExpr::getOr(LHS, RHS); in ExtractConstantBytes()
265 return ConstantExpr::getAnd(LHS, RHS); in ExtractConstantBytes()
335 Res = ConstantExpr::getLShr(Res, in ExtractConstantBytes()
337 return ConstantExpr::getTrunc(Res, IntegerType::get(C->getContext(), in ExtractConstantBytes()
[all …]
DConstantsContext.h46 class UnaryConstantExpr : public ConstantExpr {
49 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in UnaryConstantExpr()
63 class BinaryConstantExpr : public ConstantExpr {
67 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { in BinaryConstantExpr()
84 class SelectConstantExpr : public ConstantExpr {
87 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { in SelectConstantExpr()
105 class ExtractElementConstantExpr : public ConstantExpr {
108 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr()
126 class InsertElementConstantExpr : public ConstantExpr {
129 : ConstantExpr(C1->getType(), Instruction::InsertElement, in InsertElementConstantExpr()
[all …]
DConstants.cpp313 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
402 SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) { in canTrapImpl()
405 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in canTrapImpl()
411 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) { in canTrapImpl()
433 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps; in canTrap()
499 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) in needsRelocation()
501 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in needsRelocation()
502 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in needsRelocation()
1122 bool ConstantExpr::isCast() const { in isCast()
1126 bool ConstantExpr::isCompare() const { in isCompare()
[all …]
/external/llvm/lib/IR/
DConstantFold.cpp62 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i)); in BitCastConstantVector()
63 C = ConstantExpr::getBitCast(C, DstEltTy); in BitCastConstantVector()
77 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair()
133 return ConstantExpr::getInBoundsGetElementPtr(PTy->getElementType(), in FoldBitCast()
156 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
233 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes()
251 return ConstantExpr::getOr(LHS, RHS); in ExtractConstantBytes()
265 return ConstantExpr::getAnd(LHS, RHS); in ExtractConstantBytes()
335 Res = ConstantExpr::getLShr(Res, in ExtractConstantBytes()
337 return ConstantExpr::getTrunc(Res, IntegerType::get(C->getContext(), in ExtractConstantBytes()
[all …]
DConstantsContext.h33 class UnaryConstantExpr : public ConstantExpr {
42 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in UnaryConstantExpr()
50 class BinaryConstantExpr : public ConstantExpr {
60 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { in BinaryConstantExpr()
71 class SelectConstantExpr : public ConstantExpr {
80 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { in SelectConstantExpr()
92 class ExtractElementConstantExpr : public ConstantExpr {
101 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr()
113 class InsertElementConstantExpr : public ConstantExpr {
122 : ConstantExpr(C1->getType(), Instruction::InsertElement, in InsertElementConstantExpr()
[all …]
DConstants.cpp240 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
329 SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) { in canTrapImpl()
332 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in canTrapImpl()
338 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) { in canTrapImpl()
362 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps; in canTrap()
428 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) in needsRelocation()
430 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in needsRelocation()
431 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in needsRelocation()
1064 bool ConstantExpr::isCast() const { in isCast()
1068 bool ConstantExpr::isCompare() const { in isCompare()
[all …]
/external/swiftshader/third_party/LLVM/lib/VMCore/
DConstantFold.cpp68 Result.push_back(ConstantExpr::getBitCast(CV->getOperand(i), in BitCastConstantVector()
80 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair()
130 return ConstantExpr::getInBoundsGetElementPtr(V, IdxList); in FoldBitCast()
152 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
215 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes()
233 return ConstantExpr::getOr(LHS, RHS); in ExtractConstantBytes()
247 return ConstantExpr::getAnd(LHS, RHS); in ExtractConstantBytes()
317 Res = ConstantExpr::getLShr(Res, in ExtractConstantBytes()
319 return ConstantExpr::getTrunc(Res, IntegerType::get(C->getContext(), in ExtractConstantBytes()
339 return ConstantExpr::getNUWMul(E, N); in getFoldedSizeOf()
[all …]
DConstants.cpp121 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
182 const ConstantExpr *CE = dyn_cast<ConstantExpr>(this); in canTrap()
251 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) in getRelocationInfo()
253 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in getRelocationInfo()
254 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in getRelocationInfo()
741 bool ConstantExpr::isCast() const { in isCast()
745 bool ConstantExpr::isCompare() const { in isCompare()
749 bool ConstantExpr::isGEPWithNoNotionalOverIndexing() const { in isGEPWithNoNotionalOverIndexing()
774 bool ConstantExpr::hasIndices() const { in hasIndices()
779 ArrayRef<unsigned> ConstantExpr::getIndices() const { in getIndices()
[all …]
DConstantsContext.h32 class UnaryConstantExpr : public ConstantExpr {
40 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in UnaryConstantExpr()
48 class BinaryConstantExpr : public ConstantExpr {
57 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { in BinaryConstantExpr()
68 class SelectConstantExpr : public ConstantExpr {
76 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { in SelectConstantExpr()
88 class ExtractElementConstantExpr : public ConstantExpr {
96 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr()
108 class InsertElementConstantExpr : public ConstantExpr {
116 : ConstantExpr(C1->getType(), Instruction::InsertElement, in InsertElementConstantExpr()
[all …]
/external/swiftshader/third_party/LLVM/lib/Analysis/
DConstantFolding.cpp57 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
69 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
75 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
97 if (!C) return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
100 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
110 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
136 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
139 Src = ConstantExpr::getZExt(Src, Elt->getType()); in FoldBitCast()
142 Src = ConstantExpr::getShl(Src, in FoldBitCast()
147 Elt = ConstantExpr::getOr(Elt, Src); in FoldBitCast()
[all …]
/external/llvm/lib/Transforms/Utils/
DEvaluator.cpp69 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
126 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit()
178 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) in ComputeLoadResult()
206 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
227 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
251 Ptr = ConstantExpr::getGetElementPtr(nullptr, Ptr, IdxList); in EvaluateBlock()
252 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) in EvaluateBlock()
266 Val = ConstantExpr::getBitCast(Val, NewTy); in EvaluateBlock()
274 InstResult = ConstantExpr::get(BO->getOpcode(), in EvaluateBlock()
280 InstResult = ConstantExpr::getCompare(CI->getPredicate(), in EvaluateBlock()
[all …]
/external/llvm/lib/Analysis/
DConstantFolding.cpp67 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
79 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
95 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
107 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
118 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
124 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
148 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
158 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
185 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
188 Src = ConstantExpr::getZExt(Src, Elt->getType()); in FoldBitCast()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DEvaluator.cpp85 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
142 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit()
198 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) { in ComputeLoadResult()
238 auto *CE = dyn_cast<ConstantExpr>(V); in getCalleeWithFormalArgs()
275 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr); in castCallResultIfNeeded()
327 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
353 Ptr = ConstantExpr::getGetElementPtr(nullptr, Ptr, IdxList); in EvaluateBlock()
373 InstResult = ConstantExpr::get(BO->getOpcode(), in EvaluateBlock()
379 InstResult = ConstantExpr::getCompare(CI->getPredicate(), in EvaluateBlock()
385 InstResult = ConstantExpr::getCast(CI->getOpcode(), in EvaluateBlock()
[all …]

12345678910>>...18