Home
last modified time | relevance | path

Searched refs:OverflowingBinaryOperator (Results 1 – 25 of 38) sorted by relevance

12

/llvm-project-15.0.7/llvm/lib/IR/
H A DInstruction.cpp124 cast<OverflowingBinaryOperator>(this)->setHasNoUnsignedWrap(b); in setHasNoUnsignedWrap()
128 cast<OverflowingBinaryOperator>(this)->setHasNoSignedWrap(b); in setHasNoSignedWrap()
136 return cast<OverflowingBinaryOperator>(this)->hasNoUnsignedWrap(); in hasNoUnsignedWrap()
140 return cast<OverflowingBinaryOperator>(this)->hasNoSignedWrap(); in hasNoSignedWrap()
153 cast<OverflowingBinaryOperator>(this)->setHasNoUnsignedWrap(false); in dropPoisonGeneratingFlags()
154 cast<OverflowingBinaryOperator>(this)->setHasNoSignedWrap(false); in dropPoisonGeneratingFlags()
300 if (IncludeWrapFlags && isa<OverflowingBinaryOperator>(this)) { in copyIRFlags()
301 if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) { in copyIRFlags()
323 if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) { in andIRFlags()
324 if (isa<OverflowingBinaryOperator>(this)) { in andIRFlags()
H A DOperator.cpp27 auto *OBO = cast<OverflowingBinaryOperator>(this); in hasPoisonGeneratingFlags()
H A DConstants.cpp2666 unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) | in getAdd()
2667 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getAdd()
2673 unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) | in getSub()
2674 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getSub()
2680 unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) | in getMul()
2681 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getMul()
2704 unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) | in getShl()
2705 (HasNSW ? OverflowingBinaryOperator::NoSignedWrap : 0); in getShl()
3480 if (isa<OverflowingBinaryOperator>(BO)) { in getAsInstruction()
3482 OverflowingBinaryOperator::NoUnsignedWrap); in getAsInstruction()
[all …]
H A DIntrinsicInst.cpp725 return OverflowingBinaryOperator::NoSignedWrap; in getNoWrapKind()
727 return OverflowingBinaryOperator::NoUnsignedWrap; in getNoWrapKind()
H A DConstantRange.cpp291 using OBO = OverflowingBinaryOperator; in makeGuaranteedNoWrapRegion()
1018 using OBO = OverflowingBinaryOperator; in addWithNoWrap()
1065 using OBO = OverflowingBinaryOperator; in subWithNoWrap()
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DOperator.h72 class OverflowingBinaryOperator : public Operator {
348 : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {
351 : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {
354 : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {
357 : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {
H A DPatternMatch.h1138 if (auto *Op = dyn_cast<OverflowingBinaryOperator>(V)) { in match()
1141 if ((WrapFlags & OverflowingBinaryOperator::NoUnsignedWrap) && in match()
1144 if ((WrapFlags & OverflowingBinaryOperator::NoSignedWrap) && in match()
1155 OverflowingBinaryOperator::NoSignedWrap>
1163 OverflowingBinaryOperator::NoSignedWrap>
1171 OverflowingBinaryOperator::NoSignedWrap>
1179 OverflowingBinaryOperator::NoSignedWrap>
1188 OverflowingBinaryOperator::NoUnsignedWrap>
1196 OverflowingBinaryOperator::NoUnsignedWrap>
1204 OverflowingBinaryOperator::NoUnsignedWrap>
[all …]
H A DConstantFolder.h76 Flags |= OverflowingBinaryOperator::NoUnsignedWrap; in FoldNoWrapBinOp()
78 Flags |= OverflowingBinaryOperator::NoSignedWrap; in FoldNoWrapBinOp()
/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DTargetFolder.h87 Flags |= OverflowingBinaryOperator::NoUnsignedWrap; in FoldNoWrapBinOp()
89 Flags |= OverflowingBinaryOperator::NoSignedWrap; in FoldNoWrapBinOp()
H A DScalarEvolution.h47 class OverflowingBinaryOperator; variable
542 getStrengthenedNoWrapFlagsFromBinOp(const OverflowingBinaryOperator *OBO);
/llvm-project-15.0.7/llvm/unittests/IR/
H A DIRBuilderTest.cpp740 EXPECT_TRUE(cast<OverflowingBinaryOperator>(Builder.CreateNSWAdd(C, C)) in TEST_F()
742 EXPECT_TRUE(cast<OverflowingBinaryOperator>(Builder.CreateNSWSub(C, C)) in TEST_F()
744 EXPECT_TRUE(cast<OverflowingBinaryOperator>(Builder.CreateNSWMul(C, C)) in TEST_F()
746 EXPECT_TRUE(cast<OverflowingBinaryOperator>( in TEST_F()
750 EXPECT_TRUE(cast<OverflowingBinaryOperator>(Builder.CreateNUWAdd(C, C)) in TEST_F()
752 EXPECT_TRUE(cast<OverflowingBinaryOperator>(Builder.CreateNUWSub(C, C)) in TEST_F()
754 EXPECT_TRUE(cast<OverflowingBinaryOperator>(Builder.CreateNUWMul(C, C)) in TEST_F()
756 EXPECT_TRUE(cast<OverflowingBinaryOperator>( in TEST_F()
H A DConstantRangeTest.cpp724 typedef OverflowingBinaryOperator OBO; in TEST_F()
914 typedef OverflowingBinaryOperator OBO; in TEST_F()
1504 typedef OverflowingBinaryOperator OBO; in TEST()
1759 Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap, in TEST()
1766 Instruction::Add, OverflowingBinaryOperator::NoSignedWrap, in TEST()
1773 Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrap, in TEST()
1780 Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap, in TEST()
1787 Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrap, in TEST()
1794 Instruction::Mul, OverflowingBinaryOperator::NoSignedWrap, in TEST()
1801 OverflowingBinaryOperator::NoUnsignedWrap, in TEST()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp766 cast<OverflowingBinaryOperator>(BO)); in strengthenOverflowingOperation()
931 if ((isa<OverflowingBinaryOperator>(BO) && in simplifyUsers()
1372 const OverflowingBinaryOperator *OBO = in getExtendedOperandRecurrence()
1373 cast<OverflowingBinaryOperator>(DU.NarrowUse); in getExtendedOperandRecurrence()
1543 const OverflowingBinaryOperator *OBO = in widenWithVariantUse()
1544 cast<OverflowingBinaryOperator>(NarrowUse); in widenWithVariantUse()
2010 *NarrowDefRHS, OverflowingBinaryOperator::NoSignedWrap); in calculatePostIncRange()
H A DScalarEvolutionExpander.cpp241 if (isa<OverflowingBinaryOperator>(I)) { in InsertBinop()
1333 if (isa<OverflowingBinaryOperator>(IncV)) { in getAddRecExprPHILiterally()
1426 if (isa<OverflowingBinaryOperator>(Result)) { in expandAddRecExprLiterally()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp258 cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap() && in visitMul()
259 cast<OverflowingBinaryOperator>(Op1)->hasNoSignedWrap()) in visitMul()
837 auto *OBO = cast<OverflowingBinaryOperator>(Op0); in commonIDivTransforms()
864 auto *OBO = cast<OverflowingBinaryOperator>(Op0); in commonIDivTransforms()
913 bool HasNSW = cast<OverflowingBinaryOperator>(Op1)->hasNoSignedWrap(); in commonIDivTransforms()
914 bool HasNUW = cast<OverflowingBinaryOperator>(Op1)->hasNoUnsignedWrap(); in commonIDivTransforms()
H A DInstructionCombining.cpp276 auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I); in maintainNoSignedWrap()
299 auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I); in hasNoUnsignedWrap()
304 auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I); in hasNoSignedWrap()
694 if (isa<OverflowingBinaryOperator>(SimplifiedInst)) { in tryFactorization()
697 if (isa<OverflowingBinaryOperator>(&I)) { in tryFactorization()
702 if (auto *LOBO = dyn_cast<OverflowingBinaryOperator>(LHS)) { in tryFactorization()
707 if (auto *ROBO = dyn_cast<OverflowingBinaryOperator>(RHS)) { in tryFactorization()
H A DInstCombineCasts.cpp41 OverflowingBinaryOperator *OBI = dyn_cast<OverflowingBinaryOperator>(Val); in decomposeSimpleLinearExpr()
H A DInstCombineSimplifyDemanded.cpp518 bool NSW = cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap(); in SimplifyDemandedUseBits()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DValueTracking.cpp1187 Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(RHS))) in computeKnownBitsFromOperator()
1515 auto *OverflowOp = dyn_cast<OverflowingBinaryOperator>(BO); in computeKnownBitsFromOperator()
2158 const OverflowingBinaryOperator *VOBO = cast<OverflowingBinaryOperator>(V); in isKnownToBeAPowerOfTwo()
2579 const OverflowingBinaryOperator *BO = cast<OverflowingBinaryOperator>(V); in isKnownNonZero()
2653 const OverflowingBinaryOperator *BO = cast<OverflowingBinaryOperator>(V); in isKnownNonZero()
2753 auto *OBO1 = cast<OverflowingBinaryOperator>(Op1); in getInvertibleOperands()
2754 auto *OBO2 = cast<OverflowingBinaryOperator>(Op2); in getInvertibleOperands()
2769 auto *OBO1 = cast<OverflowingBinaryOperator>(Op1); in getInvertibleOperands()
2770 auto *OBO2 = cast<OverflowingBinaryOperator>(Op2); in getInvertibleOperands()
2850 if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(V2)) { in isNonEqualMul()
[all …]
H A DLazyValueInfo.cpp958 if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(BO)) { in solveBlockValueBinaryOp()
961 NoWrapKind |= OverflowingBinaryOperator::NoUnsignedWrap; in solveBlockValueBinaryOp()
963 NoWrapKind |= OverflowingBinaryOperator::NoSignedWrap; in solveBlockValueBinaryOp()
H A DInstructionSimplify.cpp1014 auto *Mul = cast<OverflowingBinaryOperator>(Op0); in simplifyDivRem()
1713 auto *AddInst = cast<OverflowingBinaryOperator>(Op0->getOperand(0)); in simplifyAndOfICmpsWithAdd()
3207 Q.IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(LBO))) || in simplifyICmpWithBinOp()
3209 Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(LBO))); in simplifyICmpWithBinOp()
3217 Q.IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(RBO))) || in simplifyICmpWithBinOp()
3219 Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(RBO))); in simplifyICmpWithBinOp()
3307 if (Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(LBO)) || in simplifyICmpWithBinOp()
3308 Q.IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(LBO)) || in simplifyICmpWithBinOp()
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DTypePromotion.cpp394 if (!isa<OverflowingBinaryOperator>(I)) in isPromotedResultSafe()
H A DMachineInstr.cpp510 if (const OverflowingBinaryOperator *OB = in copyFlagsFromInstruction()
511 dyn_cast<OverflowingBinaryOperator>(&I)) { in copyFlagsFromInstruction()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DCorrelatedValuePropagation.cpp993 using OBO = OverflowingBinaryOperator; in processBinOp()
/llvm-project-15.0.7/llvm/lib/Bitcode/Reader/
H A DBitcodeReader.cpp1569 if (isa<OverflowingBinaryOperator>(I)) { in materializeValue()
1570 if (BC->Flags & OverflowingBinaryOperator::NoSignedWrap) in materializeValue()
1572 if (BC->Flags & OverflowingBinaryOperator::NoUnsignedWrap) in materializeValue()
3070 Flags |= OverflowingBinaryOperator::NoSignedWrap; in parseConstants()
3072 Flags |= OverflowingBinaryOperator::NoUnsignedWrap; in parseConstants()

12