Home
last modified time | relevance | path

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

/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DReassociate.h69 bool HasNSW; member
76 : HasNUW(true), HasNSW(true), AllKnownNonNegative(true), in OverflowTracking()
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DConstantFolder.h69 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
77 if (HasNSW) in FoldNoWrapBinOp()
H A DIRBuilder.h1279 bool HasNUW, bool HasNSW) { in CreateInsertNUWNSWBinOp() argument
1282 if (HasNSW) BO->setHasNoSignedWrap(); in CreateInsertNUWNSWBinOp()
1333 bool HasNUW = false, bool HasNSW = false) {
1335 Folder.FoldNoWrapBinOp(Instruction::Add, LHS, RHS, HasNUW, HasNSW))
1338 HasNSW);
1350 bool HasNUW = false, bool HasNSW = false) {
1352 Folder.FoldNoWrapBinOp(Instruction::Sub, LHS, RHS, HasNUW, HasNSW))
1355 HasNSW);
1367 bool HasNUW = false, bool HasNSW = false) {
1369 Folder.FoldNoWrapBinOp(Instruction::Mul, LHS, RHS, HasNUW, HasNSW))
[all …]
H A DIRBuilderFolder.h44 bool HasNSW) const = 0;
H A DNoFolder.h59 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
H A DConstants.h1116 static Constant *getNeg(Constant *C, bool HasNSW = false);
1119 bool HasNSW = false);
1121 bool HasNSW = false);
1123 bool HasNSW = false);
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DTargetFolder.h80 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
88 if (HasNSW) in FoldNoWrapBinOp()
H A DInstSimplifyFolder.h61 bool HasNUW, bool HasNSW) const override { in FoldNoWrapBinOp() argument
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp151 const bool HasNSW = Mul.hasNoSignedWrap(); in foldMulShl1() local
157 bool PropagateNSW = HasNSW && cast<ShlOperator>(Y)->hasNoSignedWrap(); in foldMulShl1()
168 bool PropagateNSW = HasNSW && Shift->hasNoSignedWrap(); in foldMulShl1()
216 const bool HasNSW = I.hasNoSignedWrap(); in visitMul() local
221 return HasNSW ? BinaryOperator::CreateNSWNeg(Op0) in visitMul()
241 if (HasNSW && Mul->hasNoSignedWrap() && Shl->isNotMinSignedValue()) in visitMul()
253 if (HasNSW) { in visitMul()
268 Negator::Negate(/*IsNegation*/ true, HasNSW, Op0, *this)) { in visitMul()
273 HasNSW && Op1C->isNotMinSignedValue())); in visitMul()
354 if (HasNSW && cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap() && in visitMul()
[all …]
H A DInstCombineAddSub.cpp1428 bool HasNSW = I.hasNoSignedWrap() && Op0->hasNoSignedWrap() && in factorizeMathWithShlOps() local
1436 NewI->setHasNoSignedWrap(HasNSW); in factorizeMathWithShlOps()
1440 NewShl->setHasNoSignedWrap(HasNSW); in factorizeMathWithShlOps()
2237 bool HasNSW = HasNUW && I.hasNoSignedWrap() && LHSSub->hasNoSignedWrap(); in visitSub() local
2239 /* HasNSW */ HasNSW); in visitSub()
2242 Sub->setHasNoSignedWrap(HasNSW); in visitSub()
H A DInstructionCombining.cpp728 bool HasNSW = false; in tryFactorization() local
731 HasNSW = I.hasNoSignedWrap(); in tryFactorization()
735 HasNSW &= LOBO->hasNoSignedWrap(); in tryFactorization()
740 HasNSW &= ROBO->hasNoSignedWrap(); in tryFactorization()
754 cast<Instruction>(RetVal)->setHasNoSignedWrap(HasNSW); in tryFactorization()
H A DInstCombineCompares.cpp2904 bool HasNSW = Sub->hasNoSignedWrap(); in foldICmpSubConstant() local
2907 ((Cmp.isUnsigned() && HasNUW) || (Cmp.isSigned() && HasNSW)) && in foldICmpSubConstant()
2965 HasNUW, HasNSW); in foldICmpSubConstant()
4971 bool &HasNSW, bool &HasNUW) -> bool { in foldICmpBinOp() argument
4974 HasNSW = BO.hasNoSignedWrap(); in foldICmpBinOp()
4977 (CmpInst::isSigned(Pred) && HasNSW); in foldICmpBinOp()
4980 HasNSW = true; in foldICmpBinOp()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlan.h979 char HasNSW : 1; member
981 WrapFlagsTy(bool HasNUW, bool HasNSW) : HasNUW(HasNUW), HasNSW(HasNSW) {} in WrapFlagsTy()
1124 WrapFlags.HasNSW = false; in dropPoisonGeneratingFlags()
1153 I->setHasNoSignedWrap(WrapFlags.HasNSW); in setFlags()
1211 return WrapFlags.HasNSW; in hasNoSignedWrap()
H A DVPlanRecipes.cpp1024 if (WrapFlags.HasNSW) in printFlags()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstants.cpp2587 Constant *ConstantExpr::getNeg(Constant *C, bool HasNSW) { in getNeg() argument
2590 return getSub(ConstantInt::get(C->getType(), 0), C, /*HasNUW=*/false, HasNSW); in getNeg()
2600 bool HasNUW, bool HasNSW) { in getAdd() argument
2602 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getAdd()
2607 bool HasNUW, bool HasNSW) { in getSub() argument
2609 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getSub()
2614 bool HasNUW, bool HasNSW) { in getMul() argument
2616 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getMul()
H A DCore.cpp3745 void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW) { in LLVMSetNSW() argument
3747 cast<Instruction>(P)->setHasNoSignedWrap(HasNSW); in LLVMSetNSW()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp434 Flags.HasNSW &= I->hasNoSignedWrap(); in LinearizeExprTree()
540 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()
740 if (Flags.HasNSW && (Flags.AllKnownNonNegative || Flags.HasNUW)) in RewriteExprTree()
/freebsd/contrib/llvm-project/llvm/include/llvm-c/
H A DCore.h4351 void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW);
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp9325 bool HasNSW = IIQ.hasNoSignedWrap(&BO); in setLimitsForBinOp() local
9332 if (PreferSignedRange && HasNSW && HasNUW) in setLimitsForBinOp()
9338 } else if (HasNSW) { in setLimitsForBinOp()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGBuiltin.cpp2020 static Value *EmitAbs(CodeGenFunction &CGF, Value *ArgValue, bool HasNSW) { in EmitAbs() argument
2023 ConstantInt::get(CGF.Builder.getInt1Ty(), HasNSW)); in EmitAbs()