| /openbsd/src/gnu/llvm/llvm/lib/Target/X86/ |
| D | X86PartialReduction.cpp | 168 if (auto *BO = dyn_cast<BinaryOperator>(Op)) { in tryMAddReplacement() local 169 if (BO->getParent() == Mul->getParent() && in tryMAddReplacement() 170 IsFreeTruncation(BO->getOperand(0)) && in tryMAddReplacement() 171 IsFreeTruncation(BO->getOperand(1)) && in tryMAddReplacement() 362 const auto *BO = dyn_cast<BinaryOperator>(EE.getVectorOperand()); in matchAddReduction() local 363 if (!BO || BO->getOpcode() != Instruction::Add || !BO->hasOneUse()) in matchAddReduction() 365 if (EE.getParent() != BO->getParent()) in matchAddReduction() 368 unsigned NumElems = cast<FixedVectorType>(BO->getType())->getNumElements(); in matchAddReduction() 373 const Value *Op = BO; in matchAddReduction() 376 const auto *BO = dyn_cast<BinaryOperator>(Op); in matchAddReduction() local [all …]
|
| /openbsd/src/gnu/llvm/llvm/lib/Target/RISCV/ |
| D | RISCVGatherScatterLowering.cpp | 152 auto *BO = dyn_cast<BinaryOperator>(Start); in matchStridedStart() local 153 if (!BO || BO->getOpcode() != Instruction::Add) in matchStridedStart() 158 Value *Splat = getSplatValue(BO->getOperand(0)); in matchStridedStart() 160 Splat = getSplatValue(BO->getOperand(1)); in matchStridedStart() 167 std::tie(Start, Stride) = matchStridedStart(BO->getOperand(OtherIndex), in matchStridedStart() 173 Builder.SetInsertPoint(BO); in matchStridedStart() 232 auto *BO = dyn_cast<BinaryOperator>(Index); in matchStridedRecurrence() local 233 if (!BO) in matchStridedRecurrence() 236 if (BO->getOpcode() != Instruction::Add && in matchStridedRecurrence() 237 BO->getOpcode() != Instruction::Or && in matchStridedRecurrence() [all …]
|
| D | RISCVCodeGenPrepare.cpp | 56 bool visitAnd(BinaryOperator &BO); 108 bool RISCVCodeGenPrepare::visitAnd(BinaryOperator &BO) { in visitAnd() argument 112 if (!BO.getType()->isIntegerTy(64)) in visitAnd() 116 Instruction *LHS = dyn_cast<Instruction>(BO.getOperand(0)); in visitAnd() 125 Value *RHS = BO.getOperand(1); in visitAnd() 147 BO.setOperand(1, ConstantInt::get(LHS->getType(), C)); in visitAnd()
|
| /openbsd/src/gnu/llvm/llvm/lib/Transforms/Scalar/ |
| D | SeparateConstOffsetFromGEP.cpp | 269 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 321 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 504 BinaryOperator *BO, in CanTraceInto() argument 509 if (BO->getOpcode() != Instruction::Add && in CanTraceInto() 510 BO->getOpcode() != Instruction::Sub && in CanTraceInto() 511 BO->getOpcode() != Instruction::Or) { in CanTraceInto() 515 Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1); in CanTraceInto() 520 if (BO->getOpcode() == Instruction::Or && in CanTraceInto() 521 !haveNoCommonBitsSet(LHS, RHS, DL, nullptr, BO, DT)) in CanTraceInto() 535 if (BO->getOpcode() == Instruction::Add && !ZeroExtended && NonNegative) { in CanTraceInto() [all …]
|
| D | Reassociate.cpp | 157 auto *BO = dyn_cast<BinaryOperator>(V); in isReassociableOp() local 158 if (BO && BO->hasOneUse() && BO->getOpcode() == Opcode) in isReassociableOp() 159 if (!isa<FPMathOperator>(BO) || hasFPAssociativeFlags(BO)) in isReassociableOp() 160 return BO; in isReassociableOp() 166 auto *BO = dyn_cast<BinaryOperator>(V); in isReassociableOp() local 167 if (BO && BO->hasOneUse() && in isReassociableOp() 168 (BO->getOpcode() == Opcode1 || BO->getOpcode() == Opcode2)) in isReassociableOp() 169 if (!isa<FPMathOperator>(BO) || hasFPAssociativeFlags(BO)) in isReassociableOp() 170 return BO; in isReassociableOp() 519 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local [all …]
|
| D | CorrelatedValuePropagation.cpp | 441 static bool willNotOverflow(BinaryOpIntrinsic *BO, LazyValueInfo *LVI) { in willNotOverflow() argument 442 ConstantRange LRange = LVI->getConstantRangeAtUse(BO->getOperandUse(0)); in willNotOverflow() 443 ConstantRange RRange = LVI->getConstantRangeAtUse(BO->getOperandUse(1)); in willNotOverflow() 445 BO->getBinaryOp(), RRange, BO->getNoWrapKind()); in willNotOverflow() 551 if (auto *BO = dyn_cast<BinaryOperator>(NegX)) in processAbsIntrinsic() local 552 processBinOp(BO, LVI); in processAbsIntrinsic() 592 if (auto *BO = dyn_cast<BinaryOperator>(NewOp)) in processOverflowIntrinsic() local 593 processBinOp(BO, LVI); in processOverflowIntrinsic() 612 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst() local 613 processBinOp(BO, LVI); in processSaturatingInst() [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/Analysis/ |
| D | ThreadSafetyCommon.cpp | 517 const BinaryOperator *BO, in translateBinOp() argument 519 til::SExpr *E0 = translate(BO->getLHS(), Ctx); in translateBinOp() 520 til::SExpr *E1 = translate(BO->getRHS(), Ctx); in translateBinOp() 528 const BinaryOperator *BO, in translateBinAssign() argument 531 const Expr *LHS = BO->getLHS(); in translateBinAssign() 532 const Expr *RHS = BO->getRHS(); in translateBinAssign() 553 til::SExpr *SExprBuilder::translateBinaryOperator(const BinaryOperator *BO, in translateBinaryOperator() argument 555 switch (BO->getOpcode()) { in translateBinaryOperator() 558 return new (Arena) til::Undefined(BO); in translateBinaryOperator() 560 case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx); in translateBinaryOperator() [all …]
|
| D | UninitializedValues.cpp | 287 void VisitBinaryOperator(BinaryOperator *BO); 349 if (const auto *BO = dyn_cast<BinaryOperator>(E)) { in classify() local 350 switch (BO->getOpcode()) { in classify() 353 classify(BO->getLHS(), C); in classify() 356 classify(BO->getRHS(), C); in classify() 377 void ClassifyRefs::VisitBinaryOperator(BinaryOperator *BO) { in VisitBinaryOperator() argument 383 if (BO->isCompoundAssignmentOp()) in VisitBinaryOperator() 384 classify(BO->getLHS(), Use); in VisitBinaryOperator() 385 else if (BO->getOpcode() == BO_Assign || BO->getOpcode() == BO_Comma) in VisitBinaryOperator() 386 classify(BO->getLHS(), Ignore); in VisitBinaryOperator() [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/AST/Interp/ |
| D | ByteCodeExprGen.cpp | 145 bool ByteCodeExprGen<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) { in VisitBinaryOperator() argument 146 const Expr *LHS = BO->getLHS(); in VisitBinaryOperator() 147 const Expr *RHS = BO->getRHS(); in VisitBinaryOperator() 150 switch (BO->getOpcode()) { in VisitBinaryOperator() 164 std::optional<PrimType> T = classify(BO->getType()); in VisitBinaryOperator() 166 return this->bail(BO); in VisitBinaryOperator() 169 auto Discard = [this, T, BO](bool Result) { in VisitBinaryOperator() 172 return DiscardResult ? this->emitPop(*T, BO) : true; in VisitBinaryOperator() 176 if (BO->getOpcode() == BO_Add || BO->getOpcode() == BO_Sub) { in VisitBinaryOperator() 178 return this->VisitPointerArithBinOp(BO); in VisitBinaryOperator() [all …]
|
| /openbsd/src/gnu/llvm/llvm/lib/Analysis/ |
| D | ScalarEvolutionAliasAnalysis.cpp | 95 Value *BO = GetBaseValue(BS); in alias() local 96 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 101 MemoryLocation(BO ? BO : LocB.Ptr, in alias() 102 BO ? LocationSize::beforeOrAfterPointer() in alias() 104 BO ? AAMDNodes() : LocB.AATags), in alias()
|
| D | PHITransAddr.cpp | 294 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) in PHITranslateSubExpr() local 295 if (BO->getOpcode() == Instruction::Add && in PHITranslateSubExpr() 296 BO->getOperand(0) == LHS && BO->getOperand(1) == RHS && in PHITranslateSubExpr() 297 BO->getParent()->getParent() == CurBB->getParent() && in PHITranslateSubExpr() 298 (!DT || DT->dominates(BO->getParent(), PredBB))) in PHITranslateSubExpr() 299 return BO; in PHITranslateSubExpr()
|
| /openbsd/src/gnu/llvm/clang/lib/ARCMigrate/ |
| D | TransZeroOutPropsInDealloc.cpp | 151 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) in isZeroingPropIvar() local 152 return isZeroingPropIvar(BO); in isZeroingPropIvar() 191 BinaryOperator *BO = dyn_cast<BinaryOperator>(PO->getSyntacticForm()); in isZeroingPropIvar() local 192 if (!BO) return false; in isZeroingPropIvar() 193 if (BO->getOpcode() != BO_Assign) return false; in isZeroingPropIvar() 196 dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParens()); in isZeroingPropIvar() 208 return isZero(cast<OpaqueValueExpr>(BO->getRHS())->getSourceExpr()); in isZeroingPropIvar()
|
| /openbsd/src/gnu/llvm/clang/lib/Sema/ |
| D | SemaConcept.cpp | 43 if (auto *BO = dyn_cast<BinaryOperator>(E)) { in LogicalBinOp() local 44 Op = BinaryOperator::getOverloadedOperator(BO->getOpcode()); in LogicalBinOp() 45 LHS = BO->getLHS(); in LogicalBinOp() 46 RHS = BO->getRHS(); in LogicalBinOp() 47 Loc = BO->getExprLoc(); in LogicalBinOp() 96 if (LogicalBinOp BO = ConstraintExpression) { in CheckConstraintExpression() local 97 return CheckConstraintExpression(BO.getLHS(), NextToken, in CheckConstraintExpression() 99 CheckConstraintExpression(BO.getRHS(), NextToken, in CheckConstraintExpression() 176 if (LogicalBinOp BO = ConstraintExpr) { in calculateConstraintSatisfaction() local 178 S, BO.getLHS(), Satisfaction, Evaluator); in calculateConstraintSatisfaction() [all …]
|
| /openbsd/src/gnu/llvm/llvm/include/llvm/IR/ |
| D | InstrTypes.h | 251 BinaryOperator *BO = Create(Opc, V1, V2, Name, InsertBefore); 252 BO->copyIRFlags(CopyO); 253 return BO; 284 BinaryOperator *BO = Create(Opc, V1, V2, Name); 285 BO->setHasNoSignedWrap(true); 286 return BO; 290 BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); 291 BO->setHasNoSignedWrap(true); 292 return BO; 296 BinaryOperator *BO = Create(Opc, V1, V2, Name, I); [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/StaticAnalyzer/Checkers/ |
| D | InvalidatedIteratorChecker.cpp | 44 void checkPreStmt(const BinaryOperator *BO, CheckerContext &C) const; 89 void InvalidatedIteratorChecker::checkPreStmt(const BinaryOperator *BO, in checkPreStmt() argument 92 BinaryOperatorKind OK = BO->getOpcode(); in checkPreStmt() 93 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt()
|
| D | DirectIvarAssignment.cpp | 76 void VisitBinaryOperator(const BinaryOperator *BO); 166 const BinaryOperator *BO) { in VisitBinaryOperator() argument 167 if (!BO->isAssignmentOp()) in VisitBinaryOperator() 171 dyn_cast<ObjCIvarRefExpr>(BO->getLHS()->IgnoreParenCasts()); in VisitBinaryOperator()
|
| D | MismatchedIteratorChecker.cpp | 50 void checkPreStmt(const BinaryOperator *BO, CheckerContext &C) const; 194 void MismatchedIteratorChecker::checkPreStmt(const BinaryOperator *BO, in checkPreStmt() argument 196 if (!BO->isComparisonOp()) in checkPreStmt() 200 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 201 SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext()); in checkPreStmt()
|
| D | IvarInvalidationChecker.cpp | 161 void VisitBinaryOperator(const BinaryOperator *BO); 667 const BinaryOperator *BO) { in VisitBinaryOperator() argument 668 VisitStmt(BO); in VisitBinaryOperator() 672 BinaryOperatorKind Opcode = BO->getOpcode(); in VisitBinaryOperator() 678 if (isZero(BO->getRHS())) { in VisitBinaryOperator() 679 check(BO->getLHS()); in VisitBinaryOperator() 683 if (Opcode != BO_Assign && isZero(BO->getLHS())) { in VisitBinaryOperator() 684 check(BO->getRHS()); in VisitBinaryOperator()
|
| D | IteratorRangeChecker.cpp | 53 void checkPreStmt(const BinaryOperator *BO, CheckerContext &C) const; 162 void IteratorRangeChecker::checkPreStmt(const BinaryOperator *BO, in checkPreStmt() argument 165 BinaryOperatorKind OK = BO->getOpcode(); in checkPreStmt() 166 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 171 SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext()); in checkPreStmt() 172 if (!BO->getRHS()->getType()->isIntegralOrEnumerationType()) in checkPreStmt()
|
| /openbsd/src/sys/arch/powerpc64/powerpc64/ |
| D | db_disasm.c | 699 int BO, BI, cr, printcomma = 0; in disasm_process_field() local 700 BO = extract_field(instr, 10, 5); in disasm_process_field() 708 if (BO_uses_tbl[BO]) { in disasm_process_field() 710 BO_uses_tbl[BO] != 0) in disasm_process_field() 724 int BO, BI; in disasm_process_field() local 725 BO = extract_field(instr, 10, 5); in disasm_process_field() 726 strlcat (disasm_buf, db_BO_op[BO], bufsize); in disasm_process_field() 727 if ((BO & 4) != 0) { in disasm_process_field() 730 db_BOBI_cond[(BI & 0x3)| (((BO & 8) >> 1))], in disasm_process_field() 733 if (BO & 1) in disasm_process_field()
|
| /openbsd/src/sys/arch/powerpc/ddb/ |
| D | db_disasm.c | 699 int BO, BI, cr, printcomma = 0; in disasm_process_field() local 700 BO = extract_field(instr, 10, 5); in disasm_process_field() 708 if (BO_uses_tbl[BO]) { in disasm_process_field() 710 BO_uses_tbl[BO] != 0) in disasm_process_field() 724 int BO, BI; in disasm_process_field() local 725 BO = extract_field(instr, 10, 5); in disasm_process_field() 726 strlcat (disasm_buf, db_BO_op[BO], bufsize); in disasm_process_field() 727 if ((BO & 4) != 0) { in disasm_process_field() 730 db_BOBI_cond[(BI & 0x3)| (((BO & 8) >> 1))], in disasm_process_field() 733 if (BO & 1) in disasm_process_field()
|
| /openbsd/src/gnu/llvm/llvm/lib/Transforms/InstCombine/ |
| D | InstCombineCasts.cpp | 1781 auto *BO = dyn_cast<BinaryOperator>(FPT.getOperand(0)); in visitFPTrunc() local 1782 if (BO && BO->hasOneUse()) { in visitFPTrunc() 1783 Type *LHSMinType = getMinimumFPType(BO->getOperand(0)); in visitFPTrunc() 1784 Type *RHSMinType = getMinimumFPType(BO->getOperand(1)); in visitFPTrunc() 1785 unsigned OpWidth = BO->getType()->getFPMantissaWidth(); in visitFPTrunc() 1790 switch (BO->getOpcode()) { in visitFPTrunc() 1813 Value *LHS = Builder.CreateFPTrunc(BO->getOperand(0), Ty); in visitFPTrunc() 1814 Value *RHS = Builder.CreateFPTrunc(BO->getOperand(1), Ty); in visitFPTrunc() 1815 Instruction *RI = BinaryOperator::Create(BO->getOpcode(), LHS, RHS); in visitFPTrunc() 1816 RI->copyFastMathFlags(BO); in visitFPTrunc() [all …]
|
| D | InstructionCombining.cpp | 1016 Instruction *InstCombinerImpl::foldBinopOfSextBoolToSelect(BinaryOperator &BO) { in foldBinopOfSextBoolToSelect() argument 1020 Value *BO0 = BO.getOperand(0); in foldBinopOfSextBoolToSelect() 1021 Value *BO1 = BO.getOperand(1); in foldBinopOfSextBoolToSelect() 1029 Constant *Ones = ConstantInt::getAllOnesValue(BO.getType()); in foldBinopOfSextBoolToSelect() 1030 Constant *Zero = ConstantInt::getNullValue(BO.getType()); in foldBinopOfSextBoolToSelect() 1031 Value *TVal = Builder.CreateBinOp(BO.getOpcode(), Ones, C); in foldBinopOfSextBoolToSelect() 1032 Value *FVal = Builder.CreateBinOp(BO.getOpcode(), Zero, C); in foldBinopOfSextBoolToSelect() 1297 Instruction *InstCombinerImpl::foldBinopWithPhiOperands(BinaryOperator &BO) { in foldBinopWithPhiOperands() argument 1301 auto *Phi0 = dyn_cast<PHINode>(BO.getOperand(0)); in foldBinopWithPhiOperands() 1302 auto *Phi1 = dyn_cast<PHINode>(BO.getOperand(1)); in foldBinopWithPhiOperands() [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/AST/ |
| D | ExprCXX.cpp | 79 if (auto *BO = dyn_cast<BinaryOperator>(E)) { in getDecomposedForm() local 80 assert(!SkippedNot || BO->getOpcode() == BO_EQ); in getDecomposedForm() 81 Result.Opcode = SkippedNot ? BO_NE : BO->getOpcode(); in getDecomposedForm() 82 Result.LHS = BO->getLHS(); in getDecomposedForm() 83 Result.RHS = BO->getRHS(); in getDecomposedForm() 84 Result.InnerBinOp = BO; in getDecomposedForm() 85 } else if (auto *BO = dyn_cast<CXXOperatorCallExpr>(E)) { in getDecomposedForm() local 86 assert(!SkippedNot || BO->getOperator() == OO_EqualEqual); in getDecomposedForm() 87 assert(BO->isInfixBinaryOp()); in getDecomposedForm() 88 switch (BO->getOperator()) { in getDecomposedForm() [all …]
|
| /openbsd/src/gnu/llvm/llvm/lib/Support/ |
| D | FormatVariadic.cpp | 98 std::size_t BO = Fmt.find_first_of('{'); in splitLiteralAndReplacement() local 99 return std::make_pair(ReplacementItem{Fmt.substr(0, BO)}, Fmt.substr(BO)); in splitLiteralAndReplacement()
|