Home
last modified time | relevance | path

Searched refs:m_APInt (Results 1 – 25 of 34) sorted by relevance

12

/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineShifts.cpp77 if (!match(InnerShift->getOperand(1), m_APInt(InnerShiftConst))) in canEvaluateShiftedShift()
204 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift()
352 if (!match(Op1, m_APInt(Op1C))) in FoldShiftByConstant()
510 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) { in FoldShiftByConstant()
528 match(Op0BO->getOperand(0), m_APInt(Op0C))) { in FoldShiftByConstant()
554 match(TBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
573 match(FBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
605 if (match(Op1, m_APInt(ShAmtAPInt))) { in visitShl()
628 if (match(Op0, m_Exact(m_Shr(m_Value(X), m_APInt(ShOp1))))) { in visitShl()
648 if (match(Op0, m_Shl(m_Value(X), m_APInt(ShOp1)))) { in visitShl()
[all …]
DInstCombineAddSub.cpp882 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
885 if (match(X, m_Xor(m_Value(Y), m_APInt(C1)))) { in checkForNegativeOperand()
888 if (match(Y, m_Or(m_Value(Z), m_APInt(C2))) && (*C2 == ~(*C1))) { in checkForNegativeOperand()
891 } else if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && (*C1 == *C2)) { in checkForNegativeOperand()
905 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
911 if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
913 if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && *C1 == (*C2 + 1)) { in checkForNegativeOperand()
946 if (!match(Op1, m_APInt(C))) in foldAddWithConstant()
964 if (match(Op0, m_ZExt(m_Xor(m_Value(X), m_APInt(C2)))) && in foldAddWithConstant()
969 if (match(Op0, m_OneUse(m_ZExt(m_NUWAdd(m_Value(X), m_APInt(C2))))) && in foldAddWithConstant()
[all …]
DInstCombineMulDivRem.cpp105 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getLogBase2()
120 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getLogBase2()
158 match(C1, m_APInt(IVal))) { in visitMul()
181 if (match(NewCst, m_APInt(V)) && *V != Width - 1) in visitMul()
321 if (match(Op0, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1) in visitMul()
323 if (match(Op1, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1) in visitMul()
674 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
679 if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
680 (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
687 if ((IsSigned && match(Op0, m_NSWMul(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
[all …]
DInstCombineCompares.cpp1342 if (!match(Cmp.getOperand(1), m_APInt(C))) in foldICmpWithConstant()
1458 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant()
1529 if (match(Shift->getOperand(1), m_APInt(C3))) { in foldICmpAndShift()
1602 if (!match(And->getOperand(1), m_APInt(C2))) in foldICmpAndConstConst()
1714 if (And->hasOneUse() && C.isNullValue() && match(Y, m_APInt(C2))) { in foldICmpAndConstant()
1787 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant()
1870 if (Cmp.isEquality() && match(Shl->getOperand(0), m_APInt(ShiftVal))) in foldICmpShlConstant()
1874 if (!match(Shl->getOperand(1), m_APInt(ShiftAmt))) in foldICmpShlConstant()
1997 if (Cmp.isEquality() && match(Shr->getOperand(0), m_APInt(ShiftVal))) in foldICmpShrConstant()
2001 if (!match(Shr->getOperand(1), m_APInt(ShiftAmt))) in foldICmpShrConstant()
[all …]
DInstCombineSelect.cpp99 if (!match(Sel.getTrueValue(), m_APInt(SelTC)) || in foldSelectICmpAnd()
100 !match(Sel.getFalseValue(), m_APInt(SelFC))) in foldSelectICmpAnd()
394 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
425 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
706 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC))) in adjustMinMax()
973 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in foldSelectInstWithICmp()
977 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in foldSelectInstWithICmp()
981 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in foldSelectInstWithICmp()
985 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in foldSelectInstWithICmp()
1071 if (match(B, m_APInt(CB)) && match(C, m_APInt(CC))) { in foldSPFofSPF()
DInstCombineAndOrXor.cpp102 } else if (match(OldRHS, m_APInt(C))) { in SimplifyBSwap()
815 if (!match(LHS->getOperand(1), m_APInt(C1)) || in foldAndOrOfEqualityCmpsWithConstants()
816 !match(RHS->getOperand(1), m_APInt(C2))) in foldAndOrOfEqualityCmpsWithConstants()
1432 if (match(Op1, m_APInt(C))) { in visitAnd()
1443 if (match(Op0, m_OneUse(m_Xor(m_Value(X), m_APInt(XorC))))) { in visitAnd()
1452 if (match(Op0, m_OneUse(m_Or(m_Value(X), m_APInt(OrC))))) { in visitAnd()
2041 if (match(Op0, m_OneUse(m_Xor(m_Value(A), m_APInt(C)))) && in visitOr()
2050 if (match(Op1, m_OneUse(m_Xor(m_Value(A), m_APInt(C)))) && in visitOr()
2567 if (match(Op1, m_APInt(RHSC))) { in visitXor()
2570 if (match(Op0, m_Sub(m_APInt(C), m_Value(X)))) { in visitXor()
[all …]
DInstCombineSimplifyDemanded.cpp48 if (!match(Op, m_APInt(C))) in ShrinkDemandedConstant()
447 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
449 if (match(I->getOperand(0), m_Shr(m_Value(), m_APInt(ShrAmt)))) in SimplifyDemandedUseBits()
478 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
517 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
562 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
DInstCombineCasts.cpp380 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateTruncated()
392 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateTruncated()
410 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateTruncated()
815 if (match(ICI->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
997 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
1010 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
DInstructionCombining.cpp205 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in MaintainNoSignedWrap()
590 if (match(V, m_APInt(CInt)) && !CInt->isMinSignedValue()) in tryFactorization()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineMulDivRem.cpp125 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getLogBase2Vector()
203 match(C1, m_APInt(IVal))) { in visitMul()
218 if (match(C1, m_APInt(IVal)) && IVal->isPowerOf2()) in visitMul()
819 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
825 if ((IsSigned && match(LHS, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
826 (!IsSigned && match(LHS, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
833 if ((IsSigned && match(LHS, m_NSWMul(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
834 (!IsSigned && match(LHS, m_NUWMul(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
858 if ((IsSigned && match(LHS, m_NSWShl(m_Value(X), m_APInt(C1))) && in commonIDivTransforms()
860 (!IsSigned && match(LHS, m_NUWShl(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
[all …]
DInstCombineAddSub.cpp992 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
995 if (match(X, m_Xor(m_Value(Y), m_APInt(C1)))) { in checkForNegativeOperand()
998 if (match(Y, m_Or(m_Value(Z), m_APInt(C2))) && (*C2 == ~(*C1))) { in checkForNegativeOperand()
1001 } else if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && (*C1 == *C2)) { in checkForNegativeOperand()
1015 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
1021 if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
1023 if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && *C1 == (*C2 + 1)) { in checkForNegativeOperand()
DInstCombineSelect.cpp583 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in visitSelectInstWithICmp()
587 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in visitSelectInstWithICmp()
591 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in visitSelectInstWithICmp()
595 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in visitSelectInstWithICmp()
DInstructionCombining.cpp138 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in MaintainNoSignedWrap()
537 if (match(V, m_APInt(CInt)) && !CInt->isMinSignedValue()) in tryFactorization()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DInstructionSimplify.cpp988 if (match(X, m_APInt(C)) && !C->isMinSignedValue()) { in isDivZero()
998 if (match(Y, m_APInt(C))) { in isDivZero()
1335 if (match(Op1, m_APInt(ShRAmt)) && in SimplifyLShrInst()
1336 match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) && in SimplifyLShrInst()
1488 if (!match(Cmp0->getOperand(1), m_APInt(C0)) || in simplifyAndOrOfICmpsWithConstants()
1489 !match(Cmp1->getOperand(1), m_APInt(C1))) in simplifyAndOrOfICmpsWithConstants()
1560 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyAndOfICmpsWithAdd()
1631 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyOrOfICmpsWithAdd()
1809 if (match(Op1, m_APInt(Mask))) { in SimplifyAndInst()
1812 if (match(Op0, m_Shl(m_Value(X), m_APInt(ShAmt))) && in SimplifyAndInst()
[all …]
DValueTracking.cpp1582 if (match(V, m_APInt(C))) { in computeKnownBits()
2249 if (match(U->getOperand(1), m_APInt(Denominator))) { in ComputeNumSignBitsImpl()
2269 if (match(U->getOperand(1), m_APInt(Denominator))) { in ComputeNumSignBitsImpl()
2303 if (match(U->getOperand(1), m_APInt(ShAmt))) { in ComputeNumSignBitsImpl()
2314 if (match(U->getOperand(1), m_APInt(ShAmt))) { in ComputeNumSignBitsImpl()
3634 if (match(Inst->getOperand(1), m_APInt(V))) in isSafeToSpeculativelyExecute()
3642 if (!match(Inst->getOperand(1), m_APInt(Denominator))) in isSafeToSpeculativelyExecute()
3652 if (match(Inst->getOperand(0), m_APInt(Numerator))) in isSafeToSpeculativelyExecute()
4323 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
4326 if (match(FalseVal, m_SMin(m_Specific(CmpLHS), m_APInt(C2))) && in matchClamp()
[all …]
DCmpInstAnalysis.cpp73 if (!match(RHS, m_APInt(C))) in decomposeBitTestICmp()
/external/llvm/lib/Analysis/
DValueTracking.cpp1501 if (match(C, m_APInt(ConstIntOrConstSplatInt))) in isKnownToBeAPowerOfTwo()
1980 if (match(U->getOperand(1), m_APInt(Denominator))) { in ComputeNumSignBits()
2000 if (match(U->getOperand(1), m_APInt(Denominator))) { in ComputeNumSignBits()
2034 if (match(U->getOperand(1), m_APInt(ShAmt))) { in ComputeNumSignBits()
2042 if (match(U->getOperand(1), m_APInt(ShAmt))) { in ComputeNumSignBits()
3083 if (match(Inst->getOperand(1), m_APInt(V))) in isSafeToSpeculativelyExecute()
3091 if (!match(Inst->getOperand(1), m_APInt(Denominator))) in isSafeToSpeculativelyExecute()
3101 if (match(Inst->getOperand(0), m_APInt(Numerator))) in isSafeToSpeculativelyExecute()
3974 if (match(RHS, m_NSWAdd(m_Specific(LHS), m_APInt(C)))) in isTruePredicate()
3983 if (match(RHS, m_NUWAdd(m_Specific(LHS), m_APInt(C)))) in isTruePredicate()
[all …]
DInstructionSimplify.cpp1511 if (match(Op0, m_ICmp(Pred0, m_Value(V), m_APInt(C0))) && in SimplifyAndOfICmps()
1512 match(Op1, m_ICmp(Pred1, m_Specific(V), m_APInt(C1)))) { in SimplifyAndOfICmps()
2842 if (LBO && match(LBO, m_Shl(m_APInt(CI2Val), m_Value())) && in SimplifyICmpInst()
3413 match(CmpLHS, m_And(m_Value(X), m_APInt(Y))) && in SimplifySelectInst()
3432 if (FalseVal == X && match(TrueVal, m_And(m_Specific(X), m_APInt(C))) && in SimplifySelectInst()
3437 if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) && in SimplifySelectInst()
3444 if (FalseVal == X && match(TrueVal, m_Or(m_Specific(X), m_APInt(C))) && in SimplifySelectInst()
3449 if (TrueVal == X && match(FalseVal, m_Or(m_Specific(X), m_APInt(C))) && in SimplifySelectInst()
3456 if (match(CmpRHS, m_APInt(C))) { in SimplifySelectInst()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/ARM/
DARMParallelDSP.cpp280 if (!(match(V0, m_APInt(C0)) && match(V1, m_APInt(C1)) && C0 == C1)) in AreSymmetrical()
/external/llvm/lib/Transforms/Utils/
DLoopUtils.cpp88 if (match(J, m_CombineOr(m_And(m_Instruction(I), m_APInt(M)), in lookThroughAnd()
89 m_And(m_APInt(M), m_Instruction(I))))) { in lookThroughAnd()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DSimplifyIndVar.cpp795 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift()
797 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DReassociate.cpp128 if (match(V0, PatternMatch::m_APInt(C))) in XorOpnd()
131 if (match(V1, PatternMatch::m_APInt(C))) { in XorOpnd()
1307 if (match(V, PatternMatch::m_APInt(C))) { in OptimizeXor()
/external/swiftshader/third_party/LLVM/include/llvm/Support/
DPatternMatch.h112 inline apint_match m_APInt(const APInt *&Res) { return Res; } in m_APInt() function
/external/swiftshader/third_party/llvm-7.0/llvm/lib/IR/
DConstantFold.cpp946 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
/external/llvm/lib/IR/
DConstantFold.cpp942 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()

12