Home
last modified time | relevance | path

Searched refs:TrueVal (Results 1 – 25 of 43) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp510 Instruction *InstCombinerImpl::foldSelectIntoOp(SelectInst &SI, Value *TrueVal, in foldSelectIntoOp() argument
514 auto TryFoldSelectIntoOp = [&](SelectInst &SI, Value *TrueVal, in foldSelectIntoOp()
517 auto *TVI = dyn_cast<BinaryOperator>(TrueVal); in foldSelectIntoOp()
569 if (Instruction *R = TryFoldSelectIntoOp(SI, TrueVal, FalseVal, false)) in foldSelectIntoOp()
572 if (Instruction *R = TryFoldSelectIntoOp(SI, FalseVal, TrueVal, true)) in foldSelectIntoOp()
672 static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal, in foldSelectICmpLshrAshr() argument
693 std::swap(TrueVal, FalseVal); in foldSelectICmpLshrAshr()
695 if (match(TrueVal, m_LShr(m_Value(X), m_Value(Y))) && in foldSelectICmpLshrAshr()
700 bool IsExact = Ashr->isExact() && cast<Instruction>(TrueVal)->isExact(); in foldSelectICmpLshrAshr()
727 static Value *foldSelectICmpAndBinOp(const ICmpInst *IC, Value *TrueVal, in foldSelectICmpAndBinOp() argument
[all …]
H A DInstCombineShifts.cpp599 Value *TrueVal = SI->getTrueValue(); in canEvaluateShifted() local
601 return canEvaluateShifted(TrueVal, NumBits, IsLeftShift, IC, SI) && in canEvaluateShifted()
876 Value *TrueVal; in FoldShiftByConstant() local
877 if (match(Op0, m_Select(m_Value(Cond), m_Value(TrueVal), in FoldShiftByConstant()
880 if (!isa<Constant>(TrueVal) && FBO->getOperand(0) == TrueVal && in FoldShiftByConstant()
886 Value *NewShift = Builder.CreateBinOp(I.getOpcode(), TrueVal, C1); in FoldShiftByConstant()
H A DInstructionCombining.cpp1028 Value *A, *CondVal, *TrueVal, *FalseVal; in foldBinOpOfSelectAndCastOfSelectCondition() local
1034 match(SelectOp, m_Select(m_Value(CondVal), m_Value(TrueVal), in foldBinOpOfSelectAndCastOfSelectCondition()
1068 Value *NewTrueVal = NewFoldedConst(false, TrueVal); in foldBinOpOfSelectAndCastOfSelectCondition()
1074 Value *NewTrueVal = NewFoldedConst(true, TrueVal); in foldBinOpOfSelectAndCastOfSelectCondition()
1255 Value *TrueVal = LHSInst->getOperand(1); in matchSymmetricPair() local
1257 if (Cond == RHSInst->getOperand(0) && TrueVal == RHSInst->getOperand(2) && in matchSymmetricPair()
1259 return std::pair(TrueVal, FalseVal); in matchSymmetricPair()
H A DInstCombineAddSub.cpp2481 Value *Cond, *TrueVal, *FalseVal; in visitSub() local
2482 if (!match(Select, m_OneUse(m_Select(m_Value(Cond), m_Value(TrueVal), in visitSub()
2485 if (OtherHandOfSub != TrueVal && OtherHandOfSub != FalseVal) in visitSub()
2490 bool OtherHandOfSubIsTrueVal = OtherHandOfSub == TrueVal; in visitSub()
2491 Value *NewSub = SubBuilder(OtherHandOfSubIsTrueVal ? FalseVal : TrueVal); in visitSub()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp83 static Value *foldSelectWithBinaryOp(Value *Cond, Value *TrueVal, in foldSelectWithBinaryOp() argument
113 if (!match(Cond, m_c_BinOp(m_c_ICmp(Pred1, m_Specific(TrueVal), in foldSelectWithBinaryOp()
119 if (X == TrueVal || X == FalseVal || Y == TrueVal || Y == FalseVal) in foldSelectWithBinaryOp()
120 return BinOpCode == BinaryOperator::Or ? TrueVal : FalseVal; in foldSelectWithBinaryOp()
4492 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X, in simplifySelectBitTest() argument
4498 if (FalseVal == X && match(TrueVal, m_And(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest()
4500 return TrueWhenUnset ? FalseVal : TrueVal; in simplifySelectBitTest()
4504 if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest()
4506 return TrueWhenUnset ? FalseVal : TrueVal; in simplifySelectBitTest()
4511 if (FalseVal == X && match(TrueVal, m_Or(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest()
[all …]
H A DValueTracking.cpp8081 Value *TrueVal, Value *FalseVal, in matchFastFloatClamp() argument
8090 std::swap(TrueVal, FalseVal); in matchFastFloatClamp()
8095 LHS = TrueVal; in matchFastFloatClamp()
8099 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
8135 Value *TrueVal, Value *FalseVal) { in matchClamp() argument
8137 if (CmpRHS != TrueVal) { in matchClamp()
8139 std::swap(TrueVal, FalseVal); in matchClamp()
8142 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
8280 Value *TrueVal, Value *FalseVal, in matchMinMax() argument
8284 LHS = TrueVal; in matchMinMax()
[all …]
H A DLazyValueInfo.cpp851 ValueLatticeElement &TrueVal = *OptTrueVal; in solveBlockValueSelect() local
859 if (TrueVal.isConstantRange() || FalseVal.isConstantRange()) { in solveBlockValueSelect()
860 const ConstantRange &TrueCR = TrueVal.asConstantRange(SI->getType()); in solveBlockValueSelect()
885 ResultCR, TrueVal.isConstantRangeIncludingUndef() || in solveBlockValueSelect()
892 TrueCR.abs(), TrueVal.isConstantRangeIncludingUndef()); in solveBlockValueSelect()
916 TrueVal = in solveBlockValueSelect()
917 intersect(TrueVal, *getValueFromCondition(SI->getTrueValue(), Cond, in solveBlockValueSelect()
926 ValueLatticeElement Result = TrueVal; in solveBlockValueSelect()
H A DIVDescriptors.cpp733 Value *TrueVal = SI->getTrueValue(); in isConditionalRdxPattern() local
737 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern()
738 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal))) in isConditionalRdxPattern()
742 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal) in isConditionalRdxPattern()
743 : dyn_cast<Instruction>(TrueVal); in isConditionalRdxPattern()
H A DInlineCost.cpp2371 Value *TrueVal = SI.getTrueValue(); in visitSelectInst() local
2374 Constant *TrueC = dyn_cast<Constant>(TrueVal); in visitSelectInst()
2376 TrueC = SimplifiedValues.lookup(TrueVal); in visitSelectInst()
2394 ConstantOffsetPtrs.lookup(TrueVal); in visitSelectInst()
2400 if (auto *SROAArg = getSROAArgForValueOrNull(TrueVal)) in visitSelectInst()
2409 Value *SelectedV = CondC->isAllOnesValue() ? TrueVal in visitSelectInst()
H A DScalarEvolution.cpp6082 Value *TrueVal, in createNodeForSelectOrPHIInstWithICmpInstCond() argument
6105 const SCEV *LA = getSCEV(TrueVal); in createNodeForSelectOrPHIInstWithICmpInstCond()
6148 std::swap(TrueVal, FalseVal); in createNodeForSelectOrPHIInstWithICmpInstCond()
6155 const SCEV *TrueValExpr = getSCEV(TrueVal); // C+y in createNodeForSelectOrPHIInstWithICmpInstCond()
6167 isa<ConstantInt>(TrueVal) && cast<ConstantInt>(TrueVal)->isZero()) { in createNodeForSelectOrPHIInstWithICmpInstCond()
6220 createNodeForSelectViaUMinSeq(ScalarEvolution *SE, Value *Cond, Value *TrueVal, in createNodeForSelectViaUMinSeq() argument
6222 if (!isa<ConstantInt>(TrueVal) && !isa<ConstantInt>(FalseVal)) in createNodeForSelectViaUMinSeq()
6226 const auto *SETrue = SE->getSCEV(TrueVal); in createNodeForSelectViaUMinSeq()
6232 Value *V, Value *Cond, Value *TrueVal, Value *FalseVal) { in createNodeForSelectOrPHIViaUMinSeq() argument
6234 assert(TrueVal->getType() == FalseVal->getType() && in createNodeForSelectOrPHIViaUMinSeq()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DLoopVectorizationPlanner.h188 VPValue *createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
192 FMFs ? new VPInstruction(Instruction::Select, {Cond, TrueVal, FalseVal},
194 : new VPInstruction(Instruction::Select, {Cond, TrueVal, FalseVal},
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DProfDataUtils.h106 bool extractBranchWeights(const Instruction &I, uint64_t &TrueVal,
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DProfDataUtils.cpp187 bool extractBranchWeights(const Instruction &I, uint64_t &TrueVal, in extractBranchWeights() argument
202 TrueVal = Weights[0]; in extractBranchWeights()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DSROA.h52 using TrueVal = Bitfield::Element<bool, 0, 1>; // Low 0'th bit. global() variable
/freebsd/contrib/llvm-project/llvm/lib/TableGen/
H A DTGLexer.h58 TrueVal, enumerator
H A DTGLexer.cpp358 .Case("true", tgtok::TrueVal) in LexIdentifier()
/freebsd/contrib/llvm-project/llvm/lib/Target/VE/
H A DVECustomDAG.cpp413 auto TrueVal = DAG.getConstant(-1, DL, MVT::i32); in getConstantMask() local
415 auto Res = getNode(VEISD::VEC_BROADCAST, MaskVT, {TrueVal, AVL}); in getConstantMask()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DInstructionSimplify.h164 Value *simplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
H A DScalarEvolution.h1747 Value *TrueVal, Value *FalseVal);
1751 Value *TrueVal,
1758 const SCEV *createNodeForSelectOrPHI(Value *V, Value *Cond, Value *TrueVal,
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DARMISelLowering.cpp5253 SDValue TrueVal, SDValue ARMcc, SDValue CCR, in getCMOV() argument
5258 TrueVal = DAG.getNode(ARMISD::VMOVRRD, dl, in getCMOV()
5259 DAG.getVTList(MVT::i32, MVT::i32), TrueVal); in getCMOV()
5261 SDValue TrueLow = TrueVal.getValue(0); in getCMOV()
5262 SDValue TrueHigh = TrueVal.getValue(1); in getCMOV()
5273 return DAG.getNode(ARMISD::CMOV, dl, VT, FalseVal, TrueVal, ARMcc, CCR, in getCMOV()
5293 const SDValue TrueVal, const SDValue FalseVal, in isLowerSaturate() argument
5296 ((K == LHS && K == TrueVal) || (K == RHS && K == FalseVal))) || in isLowerSaturate()
5298 ((K == RHS && K == TrueVal) || (K == LHS && K == FalseVal))); in isLowerSaturate()
5390 SDValue TrueVal = Op.getOperand(2); in isLowerSaturatingConditional() local
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerBufferFatPointers.cpp844 Value *TrueVal = rsrcPartRoot(SI->getTrueValue()); in getPossibleRsrcRoots() local
846 Roots.insert(TrueVal); in getPossibleRsrcRoots()
848 if (isa<PHINode, SelectInst>(TrueVal)) in getPossibleRsrcRoots()
849 getPossibleRsrcRoots(cast<Instruction>(TrueVal), Roots, Seen); in getPossibleRsrcRoots()
H A DAMDGPUCodeGenPrepare.cpp1689 Value *TrueVal = I.getTrueValue(); in visitSelectInst() local
1711 auto *IITrue = dyn_cast<IntrinsicInst>(TrueVal); in visitSelectInst()
1715 if (Pred == FCmpInst::FCMP_UNO && TrueVal == CmpVal && IIFalse && in visitSelectInst()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DSelectOptimize.cpp953 uint64_t &TrueVal, uint64_t &FalseVal) { in extractBranchWeights() argument
955 return extractBranchWeights(*SI.getI(), TrueVal, FalseVal); in extractBranchWeights()
/freebsd/contrib/llvm-project/llvm/lib/Target/Lanai/
H A DLanaiISelLowering.cpp1431 SDValue TrueVal = OtherOp; in combineSelectAndUse() local
1436 std::swap(TrueVal, FalseVal); in combineSelectAndUse()
1438 return DAG.getNode(ISD::SELECT, SDLoc(N), VT, CCOp, TrueVal, FalseVal); in combineSelectAndUse()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DJumpThreading.cpp872 Constant *TrueVal = getKnownConstant(SI->getTrueValue(), Preference); in computeValueKnownInPredecessorsImpl() local
875 if ((TrueVal || FalseVal) && in computeValueKnownInPredecessorsImpl()
891 KnownCond = (TrueVal != nullptr); in computeValueKnownInPredecessorsImpl()
895 if (Constant *Val = KnownCond ? TrueVal : FalseVal) in computeValueKnownInPredecessorsImpl()

12