| /freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86PartialReduction.cpp | 165 if (auto *BO = dyn_cast<BinaryOperator>(Op)) { in tryMAddReplacement() local 166 if (BO->getParent() == Mul->getParent() && in tryMAddReplacement() 167 IsFreeTruncation(BO->getOperand(0)) && in tryMAddReplacement() 168 IsFreeTruncation(BO->getOperand(1)) && in tryMAddReplacement() 359 const auto *BO = dyn_cast<BinaryOperator>(EE.getVectorOperand()); in matchAddReduction() local 360 if (!BO || BO->getOpcode() != Instruction::Add || !BO->hasOneUse()) in matchAddReduction() 362 if (EE.getParent() != BO->getParent()) in matchAddReduction() 365 unsigned NumElems = cast<FixedVectorType>(BO->getType())->getNumElements(); in matchAddReduction() 370 const Value *Op = BO; in matchAddReduction() 373 const auto *BO = dyn_cast<BinaryOperator>(Op); in matchAddReduction() local [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | SeparateConstOffsetFromGEP.cpp | 269 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 321 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 515 BinaryOperator *BO, in CanTraceInto() argument 520 if (BO->getOpcode() != Instruction::Add && in CanTraceInto() 521 BO->getOpcode() != Instruction::Sub && in CanTraceInto() 522 BO->getOpcode() != Instruction::Or) { in CanTraceInto() 526 Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1); in CanTraceInto() 529 if (BO->getOpcode() == Instruction::Or && in CanTraceInto() 530 !cast<PossiblyDisjointInst>(BO)->isDisjoint()) in CanTraceInto() 536 if (ZeroExtended && !SignExtended && BO->getOpcode() == Instruction::Sub) in CanTraceInto() [all …]
|
| H A D | BDCE.cpp | 135 if (auto *BO = dyn_cast<BinaryOperator>(&I)) { in bitTrackingDCE() local 136 APInt Demanded = DB.getDemandedBits(BO); in bitTrackingDCE() 139 if (match(BO->getOperand(1), m_APInt(Mask))) { in bitTrackingDCE() 141 switch (BO->getOpcode()) { in bitTrackingDCE() 155 clearAssumptionsOfUsers(BO, DB); in bitTrackingDCE() 156 BO->replaceAllUsesWith(BO->getOperand(0)); in bitTrackingDCE() 157 Worklist.push_back(BO); in bitTrackingDCE()
|
| H A D | Reassociate.cpp | 164 auto *BO = dyn_cast<BinaryOperator>(V); in isReassociableOp() local 165 if (BO && BO->hasOneUse() && BO->getOpcode() == Opcode) in isReassociableOp() 166 if (!isa<FPMathOperator>(BO) || hasFPAssociativeFlags(BO)) in isReassociableOp() 167 return BO; in isReassociableOp() 173 auto *BO = dyn_cast<BinaryOperator>(V); in isReassociableOp() local 174 if (BO && BO->hasOneUse() && in isReassociableOp() 175 (BO->getOpcode() == Opcode1 || BO->getOpcode() == Opcode2)) in isReassociableOp() 176 if (!isa<FPMathOperator>(BO) || hasFPAssociativeFlags(BO)) in isReassociableOp() 177 return BO; in isReassociableOp() 444 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local [all …]
|
| H A D | CorrelatedValuePropagation.cpp | 459 static bool willNotOverflow(BinaryOpIntrinsic *BO, LazyValueInfo *LVI) { in willNotOverflow() argument 461 LVI->getConstantRangeAtUse(BO->getOperandUse(0), /*UndefAllowed*/ false); in willNotOverflow() 463 LVI->getConstantRangeAtUse(BO->getOperandUse(1), /*UndefAllowed*/ false); in willNotOverflow() 465 BO->getBinaryOp(), RRange, BO->getNoWrapKind()); in willNotOverflow() 546 if (auto *BO = dyn_cast<BinaryOperator>(NegX)) in processAbsIntrinsic() local 547 processBinOp(BO, LVI); in processAbsIntrinsic() 649 if (auto *BO = dyn_cast<BinaryOperator>(NewOp)) in processOverflowIntrinsic() local 650 processBinOp(BO, LVI); in processOverflowIntrinsic() 669 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst() local 670 processBinOp(BO, LVI); in processSaturatingInst() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | ExpandLargeDivRem.cpp | 56 static void scalarize(BinaryOperator *BO, in scalarize() argument 58 VectorType *VTy = cast<FixedVectorType>(BO->getType()); in scalarize() 60 IRBuilder<> Builder(BO); in scalarize() 65 Value *LHS = Builder.CreateExtractElement(BO->getOperand(0), Idx); in scalarize() 66 Value *RHS = Builder.CreateExtractElement(BO->getOperand(1), Idx); in scalarize() 67 Value *Op = Builder.CreateBinOp(BO->getOpcode(), LHS, RHS); in scalarize() 74 BO->replaceAllUsesWith(Result); in scalarize() 75 BO->dropAllReferences(); in scalarize() 76 BO->eraseFromParent(); in scalarize() 123 BinaryOperator *BO = ReplaceVector.pop_back_val(); in runImpl() local [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/ |
| H A D | RISCVGatherScatterLowering.cpp | 135 auto *BO = dyn_cast<BinaryOperator>(Start); in matchStridedStart() local 136 if (!BO || (BO->getOpcode() != Instruction::Add && in matchStridedStart() 137 BO->getOpcode() != Instruction::Or && in matchStridedStart() 138 BO->getOpcode() != Instruction::Shl && in matchStridedStart() 139 BO->getOpcode() != Instruction::Mul)) in matchStridedStart() 142 if (BO->getOpcode() == Instruction::Or && in matchStridedStart() 143 !cast<PossiblyDisjointInst>(BO)->isDisjoint()) in matchStridedStart() 148 Value *Splat = getSplatValue(BO->getOperand(1)); in matchStridedStart() 149 if (!Splat && Instruction::isCommutative(BO->getOpcode())) { in matchStridedStart() 150 Splat = getSplatValue(BO->getOperand(0)); in matchStridedStart() [all …]
|
| H A D | RISCVCodeGenPrepare.cpp | 59 bool visitAnd(BinaryOperator &BO); 70 bool RISCVCodeGenPrepare::visitAnd(BinaryOperator &BO) { in visitAnd() argument 74 if (!BO.getType()->isIntegerTy(64)) in visitAnd() 81 if (!match(BO.getOperand(0), m_NNegZExt(m_Value(LHSSrc)))) in visitAnd() 88 Value *RHS = BO.getOperand(1); in visitAnd() 103 BO.setOperand(1, ConstantInt::get(RHS->getType(), C)); in visitAnd()
|
| /freebsd/contrib/llvm-project/clang/lib/Analysis/ |
| H A D | ThreadSafetyCommon.cpp | 542 const BinaryOperator *BO, in translateBinOp() argument 544 til::SExpr *E0 = translate(BO->getLHS(), Ctx); in translateBinOp() 545 til::SExpr *E1 = translate(BO->getRHS(), Ctx); in translateBinOp() 553 const BinaryOperator *BO, in translateBinAssign() argument 556 const Expr *LHS = BO->getLHS(); in translateBinAssign() 557 const Expr *RHS = BO->getRHS(); in translateBinAssign() 578 til::SExpr *SExprBuilder::translateBinaryOperator(const BinaryOperator *BO, in translateBinaryOperator() argument 580 switch (BO->getOpcode()) { in translateBinaryOperator() 583 return new (Arena) til::Undefined(BO); in translateBinaryOperator() 585 case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx); in translateBinaryOperator() [all …]
|
| H A D | UnsafeBufferUsage.cpp | 48 std::string VisitBinaryOperator(const BinaryOperator *BO) { in VisitBinaryOperator() argument 49 return "BinaryOperator(" + BO->getOpcodeStr().str() + ")"; in VisitBinaryOperator() 302 if (const auto *BO = dyn_cast<BinaryOperator>(S); in findStmtsInUnspecifiedLvalueContext() local 303 BO && BO->getOpcode() == BO_Assign) in findStmtsInUnspecifiedLvalueContext() 304 OnResult(BO->getLHS()); in findStmtsInUnspecifiedLvalueContext() 340 if (const auto *BO = dyn_cast<BinaryOperator>(S); in findStmtsInUnspecifiedPointerContext() local 341 BO && (BO->getOpcode() == BO_EQ || BO->getOpcode() == BO_NE || in findStmtsInUnspecifiedPointerContext() 342 BO->getOpcode() == BO_LT || BO->getOpcode() == BO_LE || in findStmtsInUnspecifiedPointerContext() 343 BO->getOpcode() == BO_GT || BO->getOpcode() == BO_GE)) { in findStmtsInUnspecifiedPointerContext() 344 auto *LHS = BO->getLHS(); in findStmtsInUnspecifiedPointerContext() [all …]
|
| H A D | UninitializedValues.cpp | 296 void VisitBinaryOperator(BinaryOperator *BO); 358 if (const auto *BO = dyn_cast<BinaryOperator>(E)) { in classify() local 359 switch (BO->getOpcode()) { in classify() 362 classify(BO->getLHS(), C); in classify() 365 classify(BO->getRHS(), C); in classify() 388 void ClassifyRefs::VisitBinaryOperator(BinaryOperator *BO) { in VisitBinaryOperator() argument 394 if (BO->isCompoundAssignmentOp()) in VisitBinaryOperator() 395 classify(BO->getLHS(), Use); in VisitBinaryOperator() 396 else if (BO->getOpcode() == BO_Assign || BO->getOpcode() == BO_Comma) in VisitBinaryOperator() 397 classify(BO->getLHS(), Ignore); in VisitBinaryOperator() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | ScalarEvolutionAliasAnalysis.cpp | 108 Value *BO = GetBaseValue(BS); in alias() local 109 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 114 MemoryLocation(BO ? BO : LocB.Ptr, in alias() 115 BO ? LocationSize::beforeOrAfterPointer() in alias() 117 BO ? AAMDNodes() : LocB.AATags), in alias()
|
| H A D | PHITransAddr.cpp | 284 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) in translateSubExpr() local 285 if (BO->getOpcode() == Instruction::Add && in translateSubExpr() 286 BO->getOperand(0) == LHS && BO->getOperand(1) == RHS && in translateSubExpr() 287 BO->getParent()->getParent() == CurBB->getParent() && in translateSubExpr() 288 (!DT || DT->dominates(BO->getParent(), PredBB))) in translateSubExpr() 289 return BO; in translateSubExpr()
|
| H A D | HashRecognize.cpp | 221 if (auto *BO = dyn_cast<BinaryOperator>(I)) in computeInstr() local 222 return computeBinOp(BO); in computeInstr() 263 BinaryOperator *BO = nullptr; member 269 operator bool() const { return BO; } in operator bool() 276 BO->print(OS); in print() 323 return llvm::matchSimpleRecurrence(Phi, BO, Start, Step); in matchSimpleRecurrence() 406 BO = FoundBO; in matchConditionalRecurrence() 581 isBigEndianBitShift(ConditionalRecurrence.BO, SE); in recognizeCRC() 585 if (isBigEndianBitShift(SimpleRecurrence.BO, SE) != ByteOrderSwapped) in recognizeCRC() 630 PhiEvolutions.emplace_back(SimpleRecurrence.Phi, SimpleRecurrence.BO); in recognizeCRC()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | InstrTypes.h | 222 BinaryOperator *BO = Create(Opc, V1, V2, Name, InsertBefore); 223 BO->copyIRFlags(CopyO); 224 return BO; 231 BinaryOperator *BO = Create(Opc, V1, V2, Name, InsertBefore); 232 BO->setFastMathFlags(FMF); 233 return BO; 281 BinaryOperator *BO = Create(Opc, V1, V2, Name); 282 BO->setHasNoSignedWrap(true); 283 return BO; 289 BinaryOperator *BO = Create(Opc, V1, V2, Name, InsertBefore); [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | InvalidatedIteratorChecker.cpp | 44 void checkPreStmt(const BinaryOperator *BO, CheckerContext &C) const; 84 void InvalidatedIteratorChecker::checkPreStmt(const BinaryOperator *BO, in checkPreStmt() argument 87 BinaryOperatorKind OK = BO->getOpcode(); in checkPreStmt() 88 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt()
|
| H A 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()
|
| H A D | MismatchedIteratorChecker.cpp | 46 void checkPreStmt(const BinaryOperator *BO, CheckerContext &C) const; 190 void MismatchedIteratorChecker::checkPreStmt(const BinaryOperator *BO, in checkPreStmt() argument 192 if (!BO->isComparisonOp()) in checkPreStmt() 196 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 197 SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext()); in checkPreStmt()
|
| H A D | IvarInvalidationChecker.cpp | 160 void VisitBinaryOperator(const BinaryOperator *BO); 653 const BinaryOperator *BO) { in VisitBinaryOperator() argument 654 VisitStmt(BO); in VisitBinaryOperator() 658 BinaryOperatorKind Opcode = BO->getOpcode(); in VisitBinaryOperator() 664 if (isZero(BO->getRHS())) { in VisitBinaryOperator() 665 check(BO->getLHS()); in VisitBinaryOperator() 669 if (Opcode != BO_Assign && isZero(BO->getLHS())) { in VisitBinaryOperator() 670 check(BO->getRHS()); in VisitBinaryOperator()
|
| /freebsd/contrib/llvm-project/clang/lib/Sema/ |
| H A D | SemaConcept.cpp | 44 if (auto *BO = dyn_cast<BinaryOperator>(E)) { in LogicalBinOp() local 45 Op = BinaryOperator::getOverloadedOperator(BO->getOpcode()); in LogicalBinOp() 46 LHS = BO->getLHS(); in LogicalBinOp() 47 RHS = BO->getRHS(); in LogicalBinOp() 48 Loc = BO->getExprLoc(); in LogicalBinOp() 98 if (LogicalBinOp BO = ConstraintExpression) { in CheckConstraintExpression() local 99 return CheckConstraintExpression(BO.getLHS(), NextToken, in CheckConstraintExpression() 101 CheckConstraintExpression(BO.getRHS(), NextToken, in CheckConstraintExpression() 471 if (LogicalBinOp BO = ConstraintExpr) in calculateConstraintSatisfaction() local 473 S, BO.getLHS(), BO.getOp(), BO.getRHS(), Template, TemplateNameLoc, in calculateConstraintSatisfaction() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/ |
| H A D | RawPtrRefLocalVarsChecker.cpp | 59 bool VisitBinaryOperator(BinaryOperator *BO) override { in VisitBinaryOperator() 60 if (BO->isAssignmentOp()) { in VisitBinaryOperator() 61 if (auto *VarRef = dyn_cast<DeclRefExpr>(BO->getLHS())) { in VisitBinaryOperator() 225 bool VisitBinaryOperator(BinaryOperator *BO) override { in checkASTDecl() 226 if (BO->isAssignmentOp()) { in checkASTDecl() 227 if (auto *VarRef = dyn_cast<DeclRefExpr>(BO->getLHS())) { in checkASTDecl() 229 Checker->visitVarDecl(V, BO->getRHS(), DeclWithIssue); in checkASTDecl()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCasts.cpp | 1770 auto *BO = dyn_cast<BinaryOperator>(FPT.getOperand(0)); in visitFPTrunc() local 1771 if (BO && BO->hasOneUse()) { in visitFPTrunc() 1773 getMinimumFPType(BO->getOperand(0), /*PreferBFloat=*/Ty->isBFloatTy()); in visitFPTrunc() 1775 getMinimumFPType(BO->getOperand(1), /*PreferBFloat=*/Ty->isBFloatTy()); in visitFPTrunc() 1776 unsigned OpWidth = BO->getType()->getFPMantissaWidth(); in visitFPTrunc() 1781 switch (BO->getOpcode()) { in visitFPTrunc() 1804 Value *LHS = Builder.CreateFPTrunc(BO->getOperand(0), Ty); in visitFPTrunc() 1805 Value *RHS = Builder.CreateFPTrunc(BO->getOperand(1), Ty); in visitFPTrunc() 1806 Instruction *RI = BinaryOperator::Create(BO->getOpcode(), LHS, RHS); in visitFPTrunc() 1807 RI->copyFastMathFlags(BO); in visitFPTrunc() [all …]
|
| H A D | InstructionCombining.cpp | 1487 BinaryOperator &BO, bool OpsFromSigned, std::array<Value *, 2> IntOps, in foldFBinOpOfIntCastsFromSign() argument 1490 Type *FPTy = BO.getType(); in foldFBinOpOfIntCastsFromSign() 1522 if (OpsFromSigned != isa<SIToFPInst>(BO.getOperand(OpNo)) && in foldFBinOpOfIntCastsFromSign() 1553 return !OpsFromSigned || BO.getOpcode() != Instruction::FMul || in foldFBinOpOfIntCastsFromSign() 1560 if (OpsFromSigned && BO.getOpcode() == Instruction::FMul && in foldFBinOpOfIntCastsFromSign() 1599 switch (BO.getOpcode()) { in foldFBinOpOfIntCastsFromSign() 1628 !willNotOverflow(IntOpc, IntOps[0], IntOps[1], BO, OutputSigned)) in foldFBinOpOfIntCastsFromSign() 1646 Instruction *InstCombinerImpl::foldFBinOpOfIntCasts(BinaryOperator &BO) { in foldFBinOpOfIntCasts() argument 1652 if (!match(BO.getOperand(0), m_SIToFP(m_Value(IntOps[0]))) && in foldFBinOpOfIntCasts() 1653 !match(BO.getOperand(0), m_UIToFP(m_Value(IntOps[0])))) in foldFBinOpOfIntCasts() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ |
| H A D | ExprCXX.cpp | 78 if (auto *BO = dyn_cast<BinaryOperator>(E)) { in getDecomposedForm() local 79 assert(!SkippedNot || BO->getOpcode() == BO_EQ); in getDecomposedForm() 80 Result.Opcode = SkippedNot ? BO_NE : BO->getOpcode(); in getDecomposedForm() 81 Result.LHS = BO->getLHS(); in getDecomposedForm() 82 Result.RHS = BO->getRHS(); in getDecomposedForm() 83 Result.InnerBinOp = BO; in getDecomposedForm() 84 } else if (auto *BO = dyn_cast<CXXOperatorCallExpr>(E)) { in getDecomposedForm() local 85 assert(!SkippedNot || BO->getOperator() == OO_EqualEqual); in getDecomposedForm() 86 assert(BO->isInfixBinaryOp()); in getDecomposedForm() 87 switch (BO->getOperator()) { in getDecomposedForm() [all …]
|
| /freebsd/sys/powerpc/powerpc/ |
| H A D | db_disasm.c | 620 u_int BO, BI; in disasm_fields() local 621 BO = extract_field(instr, 31 - 10, 5); in disasm_fields() 624 if (BO & 4) { in disasm_fields() 626 if (BO & 16) { in disasm_fields() 633 APP_PSTRS(condstr[((BO & 8) >> 1) + (BI & 3)]); in disasm_fields() 640 if (BO & 2) in disasm_fields() 644 if ((BO & 24) == 0) in disasm_fields() 646 else if ((BO & 24) == 8) in disasm_fields() 655 if ((BO & 20) != 20 && (func & Op_BO) == 0) in disasm_fields() 762 u_int BO; in disasm_fields() local [all …]
|