Home
last modified time | relevance | path

Searched refs:HasNSW (Results 1 – 23 of 23) sorted by relevance

/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DConstantFolder.h70 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
78 if (HasNSW) in FoldNoWrapBinOp()
H A DIRBuilder.h1355 bool HasNUW, bool HasNSW) { in CreateInsertNUWNSWBinOp() argument
1358 if (HasNSW) BO->setHasNoSignedWrap(); in CreateInsertNUWNSWBinOp()
1409 bool HasNUW = false, bool HasNSW = false) {
1411 Folder.FoldNoWrapBinOp(Instruction::Add, LHS, RHS, HasNUW, HasNSW))
1414 HasNSW);
1426 bool HasNUW = false, bool HasNSW = false) {
1428 Folder.FoldNoWrapBinOp(Instruction::Sub, LHS, RHS, HasNUW, HasNSW))
1431 HasNSW);
1443 bool HasNUW = false, bool HasNSW = false) {
1445 Folder.FoldNoWrapBinOp(Instruction::Mul, LHS, RHS, HasNUW, HasNSW))
[all …]
H A DIRBuilderFolder.h45 bool HasNSW) const = 0;
H A DNoFolder.h60 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
H A DConstants.h1152 LLVM_ABI static Constant *getNeg(Constant *C, bool HasNSW = false);
1155 bool HasNUW = false, bool HasNSW = false);
1157 bool HasNUW = false, bool HasNSW = false);
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DTargetFolder.h81 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
89 if (HasNSW) in FoldNoWrapBinOp()
H A DInstSimplifyFolder.h63 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp148 const bool HasNSW = Mul.hasNoSignedWrap(); in foldMulShl1() local
154 bool PropagateNSW = HasNSW && cast<ShlOperator>(Y)->hasNoSignedWrap(); in foldMulShl1()
165 bool PropagateNSW = HasNSW && Shift->hasNoSignedWrap(); in foldMulShl1()
210 const bool HasNSW = I.hasNoSignedWrap(); in visitMul() local
215 return HasNSW ? BinaryOperator::CreateNSWNeg(Op0) in visitMul()
235 if (HasNSW && Mul->hasNoSignedWrap() && Shl->isNotMinSignedValue()) in visitMul()
247 if (HasNSW) { in visitMul()
276 if (HasNSW && (HasNUW || OpBO->getOpcode() == Instruction::LShr || in visitMul()
289 Negator::Negate(/*IsNegation*/ true, HasNSW, Op0, *this)) { in visitMul()
294 HasNSW && Op1C->isNotMinSignedValue())); in visitMul()
[all …]
H A DInstCombineAddSub.cpp1463 bool HasNSW = I.hasNoSignedWrap() && Op0->hasNoSignedWrap() && in factorizeMathWithShlOps() local
1471 NewI->setHasNoSignedWrap(HasNSW); in factorizeMathWithShlOps()
1475 NewShl->setHasNoSignedWrap(HasNSW); in factorizeMathWithShlOps()
2371 bool HasNSW = HasNUW && I.hasNoSignedWrap() && LHSSub->hasNoSignedWrap(); in visitSub() local
2373 /*HasNSW=*/HasNSW); in visitSub()
2376 Sub->setHasNoSignedWrap(HasNSW); in visitSub()
H A DInstCombineShifts.cpp1631 bool HasNSW = Shl0->hasNoSignedWrap() && Shl1->hasNoSignedWrap(); in visitLShr() local
1632 if (HasNUW || HasNSW) { in visitLShr()
1634 Shl0_Op1, "", HasNUW, HasNSW); in visitLShr()
H A DInstCombineCalls.cpp1602 bool HasNSW, Intrinsic::ID ROp) { in leftDistributesOverRight() argument
1613 return HasNSW && LOp == Instruction::Add; in leftDistributesOverRight()
1643 bool HasNSW = Op0->hasNoSignedWrap() && Op1->hasNoSignedWrap(); in foldIntrinsicUsingDistributiveLaws() local
1645 if (!leftDistributesOverRight(InnerOpcode, HasNUW, HasNSW, TopLevelOpcode)) in foldIntrinsicUsingDistributiveLaws()
1676 NewBinop->setHasNoSignedWrap(HasNSW); in foldIntrinsicUsingDistributiveLaws()
H A DInstructionCombining.cpp757 bool HasNSW = false; in tryFactorization() local
760 HasNSW = I.hasNoSignedWrap(); in tryFactorization()
764 HasNSW &= LOBO->hasNoSignedWrap(); in tryFactorization()
769 HasNSW &= ROBO->hasNoSignedWrap(); in tryFactorization()
783 cast<Instruction>(RetVal)->setHasNoSignedWrap(HasNSW); in tryFactorization()
H A DInstCombineCompares.cpp2985 bool HasNSW = Sub->hasNoSignedWrap(); in foldICmpSubConstant() local
2988 ((Cmp.isUnsigned() && HasNUW) || (Cmp.isSigned() && HasNSW)) && in foldICmpSubConstant()
3046 HasNUW, HasNSW); in foldICmpSubConstant()
5229 bool &HasNSW, bool &HasNUW) -> bool { in foldICmpBinOp() argument
5232 HasNSW = BO.hasNoSignedWrap(); in foldICmpBinOp()
5235 (CmpInst::isSigned(Pred) && HasNSW); in foldICmpBinOp()
5238 HasNSW = true; in foldICmpBinOp()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlan.h612 char HasNSW : 1; member
614 WrapFlagsTy(bool HasNUW, bool HasNSW) : HasNUW(HasNUW), HasNSW(HasNSW) {} in WrapFlagsTy()
619 char HasNSW : 1; member
621 TruncFlagsTy(bool HasNUW, bool HasNSW) : HasNUW(HasNUW), HasNSW(HasNSW) {} in TruncFlagsTy()
728 WrapFlags.HasNSW = false; in dropPoisonGeneratingFlags()
732 TruncFlags.HasNSW = false; in dropPoisonGeneratingFlags()
761 I.setHasNoSignedWrap(WrapFlags.HasNSW); in applyFlags()
765 I.setHasNoSignedWrap(TruncFlags.HasNSW); in applyFlags()
836 return WrapFlags.HasNSW; in hasNoSignedWrap()
838 return TruncFlags.HasNSW; in hasNoSignedWrap()
H A DVPlanRecipes.cpp1818 if (WrapFlags.HasNSW) in printFlags()
1824 if (TruncFlags.HasNSW) in printFlags()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DLocal.h589 bool HasNSW = true; member
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstants.cpp2616 Constant *ConstantExpr::getNeg(Constant *C, bool HasNSW) { in getNeg() argument
2619 return getSub(ConstantInt::get(C->getType(), 0), C, /*HasNUW=*/false, HasNSW); in getNeg()
2629 bool HasNUW, bool HasNSW) { in getAdd() argument
2631 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getAdd()
2636 bool HasNUW, bool HasNSW) { in getSub() argument
2638 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getSub()
H A DCore.cpp3800 void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW) { in LLVMSetNSW() argument
3802 cast<Instruction>(P)->setHasNoSignedWrap(HasNSW); in LLVMSetNSW()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp540 if (Opcode == Instruction::Add && Flags.AllKnownNonNegative && Flags.HasNSW) in LinearizeExprTree()
546 (Flags.HasNUW || (Flags.HasNSW && Flags.AllKnownNonNegative))) { in LinearizeExprTree()
548 if (Flags.HasNSW && Flags.AllKnownNonNegative) in LinearizeExprTree()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp9596 bool HasNSW = IIQ.hasNoSignedWrap(&BO); in setLimitsForBinOp() local
9604 if (PreferSignedRange && HasNSW && HasNUW) in setLimitsForBinOp()
9610 } else if (HasNSW) { in setLimitsForBinOp()
9626 bool HasNSW = IIQ.hasNoSignedWrap(&BO); in setLimitsForBinOp() local
9633 if (PreferSignedRange && HasNSW && HasNUW) in setLimitsForBinOp()
9639 } else if (HasNSW) { in setLimitsForBinOp()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLocal.cpp4367 HasNSW &= I.hasNoSignedWrap(); in mergeFlags()
4379 if (HasNSW && (AllKnownNonNegative || HasNUW)) in applyFlags()
/freebsd/contrib/llvm-project/llvm/include/llvm-c/
H A DCore.h4599 LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW);
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGBuiltin.cpp2051 static Value *EmitAbs(CodeGenFunction &CGF, Value *ArgValue, bool HasNSW) { in EmitAbs() argument
2054 ConstantInt::get(CGF.Builder.getInt1Ty(), HasNSW)); in EmitAbs()