Home
last modified time | relevance | path

Searched refs:BinaryOperator (Results 1 – 25 of 303) sorted by relevance

12345678910>>...13

/external/swiftshader/third_party/LLVM/include/llvm/Support/
DNoFolder.h42 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS);
48 return BinaryOperator::CreateNSWAdd(LHS, RHS); in CreateNSWAdd()
51 return BinaryOperator::CreateNUWAdd(LHS, RHS); in CreateNUWAdd()
54 return BinaryOperator::CreateFAdd(LHS, RHS); in CreateFAdd()
58 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS);
64 return BinaryOperator::CreateNSWSub(LHS, RHS); in CreateNSWSub()
67 return BinaryOperator::CreateNUWSub(LHS, RHS); in CreateNUWSub()
70 return BinaryOperator::CreateFSub(LHS, RHS); in CreateFSub()
74 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS);
80 return BinaryOperator::CreateNSWMul(LHS, RHS); in CreateNSWMul()
[all …]
/external/llvm/include/llvm/IR/
DNoFolder.h42 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS);
48 return BinaryOperator::CreateNSWAdd(LHS, RHS); in CreateNSWAdd()
51 return BinaryOperator::CreateNUWAdd(LHS, RHS); in CreateNUWAdd()
54 return BinaryOperator::CreateFAdd(LHS, RHS); in CreateFAdd()
58 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS);
64 return BinaryOperator::CreateNSWSub(LHS, RHS); in CreateNSWSub()
67 return BinaryOperator::CreateNUWSub(LHS, RHS); in CreateNUWSub()
70 return BinaryOperator::CreateFSub(LHS, RHS); in CreateFSub()
74 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS);
80 return BinaryOperator::CreateNSWMul(LHS, RHS); in CreateNSWMul()
[all …]
DInstruction.def124 HANDLE_BINARY_INST(11, Add , BinaryOperator)
125 HANDLE_BINARY_INST(12, FAdd , BinaryOperator)
126 HANDLE_BINARY_INST(13, Sub , BinaryOperator)
127 HANDLE_BINARY_INST(14, FSub , BinaryOperator)
128 HANDLE_BINARY_INST(15, Mul , BinaryOperator)
129 HANDLE_BINARY_INST(16, FMul , BinaryOperator)
130 HANDLE_BINARY_INST(17, UDiv , BinaryOperator)
131 HANDLE_BINARY_INST(18, SDiv , BinaryOperator)
132 HANDLE_BINARY_INST(19, FDiv , BinaryOperator)
133 HANDLE_BINARY_INST(20, URem , BinaryOperator)
[all …]
DInstrTypes.h328 class BinaryOperator : public Instruction {
333 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
335 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
340 BinaryOperator *cloneImpl() const;
356 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
364 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
371 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
377 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
383 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
389 static BinaryOperator *CreateWithCopiedFlags(BinaryOps Opc,
[all …]
/external/clang/include/clang/AST/
DStmtVisitor.h45 if (PTR(BinaryOperator) BinOp = dyn_cast<BinaryOperator>(S)) { in Visit()
47 case BO_PtrMemD: DISPATCH(BinPtrMemD, BinaryOperator); in Visit()
48 case BO_PtrMemI: DISPATCH(BinPtrMemI, BinaryOperator); in Visit()
49 case BO_Mul: DISPATCH(BinMul, BinaryOperator); in Visit()
50 case BO_Div: DISPATCH(BinDiv, BinaryOperator); in Visit()
51 case BO_Rem: DISPATCH(BinRem, BinaryOperator); in Visit()
52 case BO_Add: DISPATCH(BinAdd, BinaryOperator); in Visit()
53 case BO_Sub: DISPATCH(BinSub, BinaryOperator); in Visit()
54 case BO_Shl: DISPATCH(BinShl, BinaryOperator); in Visit()
55 case BO_Shr: DISPATCH(BinShr, BinaryOperator); in Visit()
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombine.h42 if (BinaryOperator::isNeg(V) || in getComplexity()
43 BinaryOperator::isFNeg(V) || in getComplexity()
44 BinaryOperator::isNot(V)) in getComplexity()
105 Instruction *visitAdd(BinaryOperator &I);
106 Instruction *visitFAdd(BinaryOperator &I);
108 Instruction *visitSub(BinaryOperator &I);
109 Instruction *visitFSub(BinaryOperator &I);
110 Instruction *visitMul(BinaryOperator &I);
111 Instruction *visitFMul(BinaryOperator &I);
112 Instruction *visitURem(BinaryOperator &I);
[all …]
DInstCombineMulDivRem.cpp47 if (BinaryOperator *I = dyn_cast<BinaryOperator>(V)) in simplifyValueKnownNonZero()
99 Instruction *InstCombiner::visitMul(BinaryOperator &I) { in visitMul()
110 return BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul()
115 if (BinaryOperator *SI = dyn_cast<BinaryOperator>(Op0)) in visitMul()
118 return BinaryOperator::CreateMul(SI->getOperand(0), in visitMul()
124 BinaryOperator *Shl = BinaryOperator::CreateShl(Op0, NewCst); in visitMul()
135 return BinaryOperator::CreateAdd(Add, Builder->CreateMul(C1, CI)); in visitMul()
156 BinaryOperator::CreateMul(Sub, in visitMul()
177 return BinaryOperator::CreateMul(Op0v, Op1v); in visitMul()
183 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0); in visitMul()
[all …]
DInstCombineAddSub.cpp86 Instruction *InstCombiner::visitAdd(BinaryOperator &I) { in visitAdd()
102 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd()
137 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd()
147 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd()
151 BinaryOperator *New = in visitAdd()
152 BinaryOperator::CreateShl(LHS, ConstantInt::get(I.getType(), 1)); in visitAdd()
163 return BinaryOperator::CreateNeg(NewAdd); in visitAdd()
166 return BinaryOperator::CreateSub(RHS, LHSV); in visitAdd()
172 return BinaryOperator::CreateSub(LHS, V); in visitAdd()
178 return BinaryOperator::CreateMul(RHS, AddOne(C2)); in visitAdd()
[all …]
DInstCombineShifts.cpp22 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) { in commonShiftTransforms()
211 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue()
253 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue()
312 BinaryOperator &I) { in FoldShiftByConstant()
344 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0)) in FoldShiftByConstant()
347 return BinaryOperator::CreateMul(BO->getOperand(0), in FoldShiftByConstant()
403 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) { in FoldShiftByConstant()
424 return BinaryOperator::CreateAnd(X, ConstantInt::get(I.getContext(), in FoldShiftByConstant()
434 cast<BinaryOperator>(Op0BOOp1)->getOperand(0)->hasOneUse()) { in FoldShiftByConstant()
441 return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM); in FoldShiftByConstant()
[all …]
DInstCombineAndOrXor.cpp36 if (BinaryOperator::isNot(V)) in isFreeToInvert()
53 if (BinaryOperator::isNot(V)) { in dyn_castNotVal()
54 Value *Operand = BinaryOperator::getNotArgument(V); in dyn_castNotVal()
197 BinaryOperator &TheAnd) { in OptAndOp()
209 return BinaryOperator::CreateXor(And, Together); in OptAndOp()
218 return BinaryOperator::CreateAnd(Or, AndRHS); in OptAndOp()
229 return BinaryOperator::CreateOr(And, OpRHS); in OptAndOp()
261 return BinaryOperator::CreateXor(NewAnd, AndRHS); in OptAndOp()
324 return BinaryOperator::CreateAnd(ShVal, AndRHS, TheAnd.getName()); in OptAndOp()
1033 Instruction *InstCombiner::visitAnd(BinaryOperator &I) { in visitAnd()
[all …]
/external/swiftshader/third_party/LLVM/include/llvm/
DInstrTypes.h140 class BinaryOperator : public Instruction {
144 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
146 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
148 virtual BinaryOperator *clone_impl() const;
163 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
171 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
178 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
184 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
190 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
196 static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
[all …]
DInstruction.def109 HANDLE_BINARY_INST( 9, Add , BinaryOperator)
110 HANDLE_BINARY_INST(10, FAdd , BinaryOperator)
111 HANDLE_BINARY_INST(11, Sub , BinaryOperator)
112 HANDLE_BINARY_INST(12, FSub , BinaryOperator)
113 HANDLE_BINARY_INST(13, Mul , BinaryOperator)
114 HANDLE_BINARY_INST(14, FMul , BinaryOperator)
115 HANDLE_BINARY_INST(15, UDiv , BinaryOperator)
116 HANDLE_BINARY_INST(16, SDiv , BinaryOperator)
117 HANDLE_BINARY_INST(17, FDiv , BinaryOperator)
118 HANDLE_BINARY_INST(18, URem , BinaryOperator)
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombineInternal.h54 if (BinaryOperator::isNeg(V) || BinaryOperator::isFNeg(V) || in getComplexity()
55 BinaryOperator::isNot(V)) in getComplexity()
80 if (BinaryOperator::isNot(V)) in IsFreeToInvert()
94 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V)) in IsFreeToInvert()
229 Instruction *visitAdd(BinaryOperator &I);
230 Instruction *visitFAdd(BinaryOperator &I);
232 Instruction *visitSub(BinaryOperator &I);
233 Instruction *visitFSub(BinaryOperator &I);
234 Instruction *visitMul(BinaryOperator &I);
237 Instruction *visitFMul(BinaryOperator &I);
[all …]
DInstCombineMulDivRem.cpp48 BinaryOperator *I = dyn_cast<BinaryOperator>(V); in simplifyValueKnownNonZero()
175 Instruction *InstCombiner::visitMul(BinaryOperator &I) { in visitMul()
190 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul()
206 BinaryOperator *Mul = cast<BinaryOperator>(I.getOperand(0)); in visitMul()
207 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul()
228 BinaryOperator *Shl = BinaryOperator::CreateShl(NewOp, NewCst); in visitMul()
261 BinaryOperator::CreateMul(Sub, in visitMul()
288 return BinaryOperator::CreateAdd(Builder->CreateMul(X, Op1), Mul); in visitMul()
295 BinaryOperator *BO = BinaryOperator::CreateMul(Op0v, Op1v); in visitMul()
308 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0); in visitMul()
[all …]
DInstCombineShifts.cpp24 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) { in commonShiftTransforms()
218 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue()
262 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue()
323 BinaryOperator &I) { in FoldShiftByConstant()
356 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0)) in FoldShiftByConstant()
359 return BinaryOperator::CreateMul(BO->getOperand(0), in FoldShiftByConstant()
415 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) { in FoldShiftByConstant()
441 return BinaryOperator::CreateAnd(X, Mask); in FoldShiftByConstant()
456 return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM); in FoldShiftByConstant()
477 return BinaryOperator::CreateAnd(X, Mask); in FoldShiftByConstant()
[all …]
DInstCombineAndOrXor.cpp29 if (BinaryOperator::isNot(V)) { in dyn_castNotVal()
30 Value *Operand = BinaryOperator::getNotArgument(V); in dyn_castNotVal()
97 Value *InstCombiner::SimplifyBSwap(BinaryOperator &I) { in SimplifyBSwap()
153 BinaryOperator &TheAnd) { in OptAndOp()
165 return BinaryOperator::CreateXor(And, Together); in OptAndOp()
174 return BinaryOperator::CreateAnd(Or, AndRHS); in OptAndOp()
185 return BinaryOperator::CreateOr(And, OpRHS); in OptAndOp()
217 return BinaryOperator::CreateXor(NewAnd, AndRHS); in OptAndOp()
277 return BinaryOperator::CreateAnd(ShVal, AndRHS, TheAnd.getName()); in OptAndOp()
1151 static Instruction *matchDeMorgansLaws(BinaryOperator &I, in matchDeMorgansLaws()
[all …]
DInstCombineAddSub.cpp974 static Value *checkForNegativeOperand(BinaryOperator &I, in checkForNegativeOperand()
1030 Instruction *InstCombiner::visitAdd(BinaryOperator &I) { in visitAdd()
1049 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd()
1084 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd()
1095 return BinaryOperator::CreateSub(ConstantExpr::getAdd(XorRHS, CI), in visitAdd()
1101 return BinaryOperator::CreateAdd(XorLHS, in visitAdd()
1111 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd()
1115 BinaryOperator *New = in visitAdd()
1116 BinaryOperator::CreateShl(LHS, ConstantInt::get(I.getType(), 1)); in visitAdd()
1128 return BinaryOperator::CreateNeg(NewAdd); in visitAdd()
[all …]
/external/llvm/include/llvm/Transforms/Utils/
DIntegerDivision.h21 class BinaryOperator; variable
33 bool expandRemainder(BinaryOperator *Rem);
42 bool expandDivision(BinaryOperator* Div);
50 bool expandRemainderUpTo32Bits(BinaryOperator *Rem);
56 bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
63 bool expandDivisionUpTo32Bits(BinaryOperator *Div);
69 bool expandDivisionUpTo64Bits(BinaryOperator *Div);
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/
DReassociate.cpp95 Value *ReassociateExpression(BinaryOperator *I);
96 void RewriteExprTree(BinaryOperator *I, SmallVectorImpl<ValueEntry> &Ops,
98 Value *OptimizeExpression(BinaryOperator *I,
101 void LinearizeExprTree(BinaryOperator *I, SmallVectorImpl<ValueEntry> &Ops);
102 void LinearizeExpr(BinaryOperator *I);
119 if (!Op || !isa<BinaryOperator>(Op)) in RemoveDeadBinaryOp()
192 (!BinaryOperator::isNot(I) && !BinaryOperator::isNeg(I))) in getRank()
203 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) { in isReassociableOp()
206 return cast<BinaryOperator>(V); in isReassociableOp()
216 Instruction *Res = BinaryOperator::CreateMul(Neg->getOperand(1), Cst, "",Neg); in LowerNegateToMultiply()
[all …]
/external/llvm/lib/Transforms/Scalar/
DReassociate.cpp128 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) { in isReassociableOp()
133 return cast<BinaryOperator>(V); in isReassociableOp()
137 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode1, in isReassociableOp()
144 return cast<BinaryOperator>(V); in isReassociableOp()
191 if (!BinaryOperator::isNot(I) && !BinaryOperator::isNeg(I) && in getRank()
192 !BinaryOperator::isFNeg(I)) in getRank()
202 assert(isa<BinaryOperator>(I) && "Expected binary operator."); in canonicalizeOperands()
214 cast<BinaryOperator>(I)->swapOperands(); in canonicalizeOperands()
217 static BinaryOperator *CreateAdd(Value *S1, Value *S2, const Twine &Name, in CreateAdd()
220 return BinaryOperator::CreateAdd(S1, S2, Name, InsertBefore); in CreateAdd()
[all …]
/external/swiftshader/third_party/LLVM/unittests/Transforms/Utils/
DCloning.cpp54 BinaryOperator *Add = BinaryOperator::Create(Instruction::Add, V, V); in TEST_F()
55 BinaryOperator *Sub = BinaryOperator::Create(Instruction::Sub, V, V); in TEST_F()
56 BinaryOperator *Mul = BinaryOperator::Create(Instruction::Mul, V, V); in TEST_F()
58 BinaryOperator *AddClone = this->clone(Add); in TEST_F()
59 BinaryOperator *SubClone = this->clone(Sub); in TEST_F()
60 BinaryOperator *MulClone = this->clone(Mul); in TEST_F()
137 BinaryOperator *SDiv = BinaryOperator::Create(Instruction::SDiv, V, V); in TEST_F()
/external/swiftshader/third_party/llvm-subzero/include/llvm/IR/
DInstruction.def124 HANDLE_BINARY_INST(11, Add , BinaryOperator)
125 HANDLE_BINARY_INST(12, FAdd , BinaryOperator)
126 HANDLE_BINARY_INST(13, Sub , BinaryOperator)
127 HANDLE_BINARY_INST(14, FSub , BinaryOperator)
128 HANDLE_BINARY_INST(15, Mul , BinaryOperator)
129 HANDLE_BINARY_INST(16, FMul , BinaryOperator)
130 HANDLE_BINARY_INST(17, UDiv , BinaryOperator)
131 HANDLE_BINARY_INST(18, SDiv , BinaryOperator)
132 HANDLE_BINARY_INST(19, FDiv , BinaryOperator)
133 HANDLE_BINARY_INST(20, URem , BinaryOperator)
[all …]
/external/clang/lib/StaticAnalyzer/Checkers/
DIdenticalExprChecker.cpp49 bool VisitBinaryOperator(const BinaryOperator *B);
54 void reportIdenticalExpr(const BinaryOperator *B, bool CheckBitwise,
56 void checkBitwiseOrLogicalOp(const BinaryOperator *B, bool CheckBitwise);
57 void checkComparisonOp(const BinaryOperator *B);
61 void FindIdenticalExprVisitor::reportIdenticalExpr(const BinaryOperator *B, in reportIdenticalExpr()
78 void FindIdenticalExprVisitor::checkBitwiseOrLogicalOp(const BinaryOperator *B, in checkBitwiseOrLogicalOp()
89 while (const BinaryOperator *B2 = dyn_cast<BinaryOperator>(LHS)) { in checkBitwiseOrLogicalOp()
182 bool FindIdenticalExprVisitor::VisitBinaryOperator(const BinaryOperator *B) { in VisitBinaryOperator()
183 BinaryOperator::Opcode Op = B->getOpcode(); in VisitBinaryOperator()
185 if (BinaryOperator::isBitwiseOp(Op)) in VisitBinaryOperator()
[all …]
DUndefResultChecker.cpp29 : public Checker< check::PostStmt<BinaryOperator> > {
34 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const;
38 void UndefResultChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt()
78 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
84 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
/external/clang/unittests/AST/
DASTTypeTraitsTest.cpp58 EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<BinaryOperator>())); in TEST()
59 EXPECT_FALSE(DNT<CallExpr>().isBaseOf(DNT<BinaryOperator>())); in TEST()
60 EXPECT_FALSE(DNT<BinaryOperator>().isBaseOf(DNT<CallExpr>())); in TEST()
70 EXPECT_TRUE(DNT<BinaryOperator>().isSame( in TEST()
71 ASTNodeKind::getMostDerivedType(DNT<Expr>(), DNT<BinaryOperator>()))); in TEST()
72 EXPECT_TRUE(DNT<BinaryOperator>().isSame( in TEST()
73 ASTNodeKind::getMostDerivedType(DNT<BinaryOperator>(), DNT<Expr>()))); in TEST()
81 DNT<BinaryOperator>()).isNone()); in TEST()
86 DNT<Expr>(), DNT<BinaryOperator>()))); in TEST()
88 DNT<BinaryOperator>(), DNT<Expr>()))); in TEST()

12345678910>>...13