/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSelect.cpp | 229 Instruction *InstCombiner::FoldSelectIntoOp(SelectInst &SI, Value *TrueVal, in FoldSelectIntoOp() argument 233 if (Instruction *TVI = dyn_cast<Instruction>(TrueVal)) { in FoldSelectIntoOp() 265 !isa<Constant>(TrueVal)) { in FoldSelectIntoOp() 268 if ((SFO & 1) && TrueVal == FVI->getOperand(0)) { in FoldSelectIntoOp() 270 } else if ((SFO & 2) && TrueVal == FVI->getOperand(1)) { in FoldSelectIntoOp() 284 TrueVal, NewSel); in FoldSelectIntoOp() 309 static Value *foldSelectICmpAndOr(const SelectInst &SI, Value *TrueVal, in foldSelectICmpAndOr() argument 329 bool OrOnFalseVal = match(FalseVal, m_Or(m_Specific(TrueVal), m_Power2(C2))); in foldSelectICmpAndOr() 331 OrOnTrueVal = match(TrueVal, m_Or(m_Specific(FalseVal), m_Power2(C2))); in foldSelectICmpAndOr() 337 Value *Y = OrOnFalseVal ? TrueVal : FalseVal; in foldSelectICmpAndOr() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSelect.cpp | 424 Instruction *InstCombiner::foldSelectIntoOp(SelectInst &SI, Value *TrueVal, in foldSelectIntoOp() argument 428 if (auto *TVI = dyn_cast<BinaryOperator>(TrueVal)) { in foldSelectIntoOp() 460 if (FVI->hasOneUse() && !isa<Constant>(TrueVal)) { in foldSelectIntoOp() 463 if ((SFO & 1) && TrueVal == FVI->getOperand(0)) { in foldSelectIntoOp() 465 } else if ((SFO & 2) && TrueVal == FVI->getOperand(1)) { in foldSelectIntoOp() 481 TrueVal, NewSel); in foldSelectIntoOp() 539 static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal, in foldSelectICmpLshrAshr() argument 560 std::swap(TrueVal, FalseVal); in foldSelectICmpLshrAshr() 562 if (match(TrueVal, m_LShr(m_Value(X), m_Value(Y))) && in foldSelectICmpLshrAshr() 567 bool IsExact = Ashr->isExact() && cast<Instruction>(TrueVal)->isExact(); in foldSelectICmpLshrAshr() [all …]
|
D | InstCombineShifts.cpp | 528 Value *TrueVal = SI->getTrueValue(); in canEvaluateShifted() local 530 return canEvaluateShifted(TrueVal, NumBits, IsLeftShift, IC, SI) && in canEvaluateShifted() 903 Value *TrueVal; in FoldShiftByConstant() local 904 if (match(Op0, m_Select(m_Value(Cond), m_Value(TrueVal), in FoldShiftByConstant() 907 if (!isa<Constant>(TrueVal) && FBO->getOperand(0) == TrueVal && in FoldShiftByConstant() 914 Builder.CreateBinOp(I.getOpcode(), TrueVal, Op1); in FoldShiftByConstant()
|
/external/llvm-project/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSelect.cpp | 402 Instruction *InstCombinerImpl::foldSelectIntoOp(SelectInst &SI, Value *TrueVal, in foldSelectIntoOp() argument 406 if (auto *TVI = dyn_cast<BinaryOperator>(TrueVal)) { in foldSelectIntoOp() 439 if (FVI->hasOneUse() && !isa<Constant>(TrueVal)) { in foldSelectIntoOp() 442 if ((SFO & 1) && TrueVal == FVI->getOperand(0)) { in foldSelectIntoOp() 444 } else if ((SFO & 2) && TrueVal == FVI->getOperand(1)) { in foldSelectIntoOp() 461 TrueVal, NewSel); in foldSelectIntoOp() 519 static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal, in foldSelectICmpLshrAshr() argument 540 std::swap(TrueVal, FalseVal); in foldSelectICmpLshrAshr() 542 if (match(TrueVal, m_LShr(m_Value(X), m_Value(Y))) && in foldSelectICmpLshrAshr() 547 bool IsExact = Ashr->isExact() && cast<Instruction>(TrueVal)->isExact(); in foldSelectICmpLshrAshr() [all …]
|
D | InstCombineShifts.cpp | 505 Value *TrueVal = SI->getTrueValue(); in canEvaluateShifted() local 507 return canEvaluateShifted(TrueVal, NumBits, IsLeftShift, IC, SI) && in canEvaluateShifted() 863 Value *TrueVal; in FoldShiftByConstant() local 864 if (match(Op0, m_Select(m_Value(Cond), m_Value(TrueVal), in FoldShiftByConstant() 867 if (!isa<Constant>(TrueVal) && FBO->getOperand(0) == TrueVal && in FoldShiftByConstant() 874 Builder.CreateBinOp(I.getOpcode(), TrueVal, Op1); in FoldShiftByConstant()
|
/external/llvm-project/llvm/test/Transforms/InstCombine/ |
D | subtract-of-one-hand-of-select.ll | 5 ; sub (select %Cond, %TrueVal, %FalseVal), %Op1 7 ; select %Cond, (sub %TrueVal, %Op1), (sub %FalseVal, %Op1) 23 define i8 @t1_sub_of_falseval(i1 %c, i8 %TrueVal, i8 %Op1) { 29 %o = select i1 %c, i8 %TrueVal, i8 %Op1, !prof !0 ; while there, ensure preservation of prof md 66 define i8 @n4_wrong_hands(i1 %c, i8 %TrueVal, i8 %FalseVal, i8 %Op1) { 72 %o = select i1 %c, i8 %TrueVal, i8 %FalseVal ; none of the hands is %Op1
|
D | subtract-from-one-hand-of-select.ll | 5 ; sub %Op0, (select %Cond, %TrueVal, %FalseVal) 7 ; select %Cond, (sub %Op0, %TrueVal), (sub %Op0, %FalseVal) 23 define i8 @t1_sub_from_falseval(i1 %c, i8 %TrueVal, i8 %Op0) { 29 %o = select i1 %c, i8 %TrueVal, i8 %Op0, !prof !0 ; while there, ensure preservation of prof md 66 define i8 @n4_wrong_hands(i1 %c, i8 %TrueVal, i8 %FalseVal, i8 %Op0) { 72 %o = select i1 %c, i8 %TrueVal, i8 %FalseVal ; none of the hands is %Op0
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 72 static Value *foldSelectWithBinaryOp(Value *Cond, Value *TrueVal, in foldSelectWithBinaryOp() argument 102 if (!match(Cond, m_c_BinOp(m_c_ICmp(Pred1, m_Specific(TrueVal), in foldSelectWithBinaryOp() 108 if (X == TrueVal || X == FalseVal || Y == TrueVal || Y == FalseVal) in foldSelectWithBinaryOp() 109 return BinOpCode == BinaryOperator::Or ? TrueVal : FalseVal; in foldSelectWithBinaryOp() 3805 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X, in simplifySelectBitTest() argument 3811 if (FalseVal == X && match(TrueVal, m_And(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest() 3813 return TrueWhenUnset ? FalseVal : TrueVal; in simplifySelectBitTest() 3817 if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest() 3819 return TrueWhenUnset ? FalseVal : TrueVal; in simplifySelectBitTest() 3824 if (FalseVal == X && match(TrueVal, m_Or(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest() [all …]
|
D | ValueTracking.cpp | 4662 Value *TrueVal, Value *FalseVal, in matchFastFloatClamp() argument 4671 std::swap(TrueVal, FalseVal); in matchFastFloatClamp() 4676 LHS = TrueVal; in matchFastFloatClamp() 4680 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp() 4716 Value *TrueVal, Value *FalseVal) { in matchClamp() argument 4718 if (CmpRHS != TrueVal) { in matchClamp() 4720 std::swap(TrueVal, FalseVal); in matchClamp() 4723 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp() 4846 Value *TrueVal, Value *FalseVal, in matchMinMax() argument 4850 LHS = TrueVal; in matchMinMax() [all …]
|
D | IVDescriptors.cpp | 529 Value *TrueVal = SI->getTrueValue(); in isConditionalRdxPattern() local 533 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern() 534 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal))) in isConditionalRdxPattern() 538 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal) in isConditionalRdxPattern() 539 : dyn_cast<Instruction>(TrueVal); in isConditionalRdxPattern()
|
D | LazyValueInfo.cpp | 868 ValueLatticeElement TrueVal = getBlockValue(SI->getTrueValue(), BB); in solveBlockValueSelect() local 871 if (TrueVal.isOverdefined()) { in solveBlockValueSelect() 890 if (TrueVal.isConstantRange() && FalseVal.isConstantRange()) { in solveBlockValueSelect() 891 const ConstantRange &TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect() 946 TrueVal = intersect(TrueVal, in solveBlockValueSelect() 985 TrueVal = intersect(TrueVal, in solveBlockValueSelect() 994 Result.mergeIn(TrueVal, DL); in solveBlockValueSelect()
|
D | InlineCost.cpp | 1573 Value *TrueVal = SI.getTrueValue(); in visitSelectInst() local 1576 Constant *TrueC = dyn_cast<Constant>(TrueVal); in visitSelectInst() 1578 TrueC = SimplifiedValues.lookup(TrueVal); in visitSelectInst() 1596 ConstantOffsetPtrs.lookup(TrueVal); in visitSelectInst() 1602 if (auto *SROAArg = getSROAArgForValueOrNull(TrueVal)) in visitSelectInst() 1612 ? TrueVal in visitSelectInst()
|
D | CFLGraph.h | 338 auto *TrueVal = Inst.getTrueValue(); in visitSelectInst() local 340 addAssignEdge(TrueVal, &Inst); in visitSelectInst()
|
/external/llvm-project/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 72 static Value *foldSelectWithBinaryOp(Value *Cond, Value *TrueVal, in foldSelectWithBinaryOp() argument 102 if (!match(Cond, m_c_BinOp(m_c_ICmp(Pred1, m_Specific(TrueVal), in foldSelectWithBinaryOp() 108 if (X == TrueVal || X == FalseVal || Y == TrueVal || Y == FalseVal) in foldSelectWithBinaryOp() 109 return BinOpCode == BinaryOperator::Or ? TrueVal : FalseVal; in foldSelectWithBinaryOp() 3927 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X, in simplifySelectBitTest() argument 3933 if (FalseVal == X && match(TrueVal, m_And(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest() 3935 return TrueWhenUnset ? FalseVal : TrueVal; in simplifySelectBitTest() 3939 if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest() 3941 return TrueWhenUnset ? FalseVal : TrueVal; in simplifySelectBitTest() 3946 if (FalseVal == X && match(TrueVal, m_Or(m_Specific(X), m_APInt(C))) && in simplifySelectBitTest() [all …]
|
D | ValueTracking.cpp | 5268 Value *TrueVal, Value *FalseVal, in matchFastFloatClamp() argument 5277 std::swap(TrueVal, FalseVal); in matchFastFloatClamp() 5282 LHS = TrueVal; in matchFastFloatClamp() 5286 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp() 5322 Value *TrueVal, Value *FalseVal) { in matchClamp() argument 5324 if (CmpRHS != TrueVal) { in matchClamp() 5326 std::swap(TrueVal, FalseVal); in matchClamp() 5329 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp() 5467 Value *TrueVal, Value *FalseVal, in matchMinMax() argument 5471 LHS = TrueVal; in matchMinMax() [all …]
|
D | LazyValueInfo.cpp | 802 ValueLatticeElement &TrueVal = *OptTrueVal; in solveBlockValueSelect() local 806 if (TrueVal.isOverdefined()) in solveBlockValueSelect() 820 if (TrueVal.isConstantRange() && FalseVal.isConstantRange()) { in solveBlockValueSelect() 821 const ConstantRange &TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect() 845 ResultCR, TrueVal.isConstantRangeIncludingUndef() | in solveBlockValueSelect() 852 TrueCR.abs(), TrueVal.isConstantRangeIncludingUndef()); in solveBlockValueSelect() 873 TrueVal = intersect(TrueVal, in solveBlockValueSelect() 912 TrueVal = intersect(TrueVal, in solveBlockValueSelect() 920 ValueLatticeElement Result = TrueVal; in solveBlockValueSelect()
|
D | IVDescriptors.cpp | 531 Value *TrueVal = SI->getTrueValue(); in isConditionalRdxPattern() local 535 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern() 536 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal))) in isConditionalRdxPattern() 540 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal) in isConditionalRdxPattern() 541 : dyn_cast<Instruction>(TrueVal); in isConditionalRdxPattern()
|
D | CFLGraph.h | 338 auto *TrueVal = Inst.getTrueValue(); in visitSelectInst() local 340 addAssignEdge(TrueVal, &Inst); in visitSelectInst()
|
D | InlineCost.cpp | 1735 Value *TrueVal = SI.getTrueValue(); in visitSelectInst() local 1738 Constant *TrueC = dyn_cast<Constant>(TrueVal); in visitSelectInst() 1740 TrueC = SimplifiedValues.lookup(TrueVal); in visitSelectInst() 1758 ConstantOffsetPtrs.lookup(TrueVal); in visitSelectInst() 1764 if (auto *SROAArg = getSROAArgForValueOrNull(TrueVal)) in visitSelectInst() 1774 ? TrueVal in visitSelectInst()
|
/external/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 3376 static Value *SimplifySelectInst(Value *CondVal, Value *TrueVal, in SimplifySelectInst() argument 3383 return TrueVal; in SimplifySelectInst() 3389 if (TrueVal == FalseVal) in SimplifySelectInst() 3390 return TrueVal; in SimplifySelectInst() 3393 if (isa<Constant>(TrueVal)) in SimplifySelectInst() 3394 return TrueVal; in SimplifySelectInst() 3397 if (isa<UndefValue>(TrueVal)) // select C, undef, X -> X in SimplifySelectInst() 3400 return TrueVal; in SimplifySelectInst() 3403 unsigned BitWidth = Q.DL.getTypeSizeInBits(TrueVal->getType()); in SimplifySelectInst() 3432 if (FalseVal == X && match(TrueVal, m_And(m_Specific(X), m_APInt(C))) && in SimplifySelectInst() [all …]
|
D | LazyValueInfo.cpp | 887 LVILatticeVal TrueVal = getBlockValue(SI->getTrueValue(), BB); in solveBlockValueSelect() local 890 if (TrueVal.isOverdefined()) { in solveBlockValueSelect() 909 if (TrueVal.isConstantRange() && FalseVal.isConstantRange()) { in solveBlockValueSelect() 910 ConstantRange TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect() 952 TrueVal = intersect(TrueVal, TrueValTaken); in solveBlockValueSelect() 989 TrueVal = intersect(TrueVal, in solveBlockValueSelect() 998 Result.mergeIn(TrueVal, DL); in solveBlockValueSelect()
|
D | CFLGraph.h | 284 auto *TrueVal = Inst.getTrueValue(); in visitSelectInst() local 286 addAssignEdge(TrueVal, &Inst); in visitSelectInst()
|
D | ValueTracking.cpp | 3709 Value *TrueVal, Value *FalseVal, in matchSelectPattern() argument 3771 if (TrueVal == CmpRHS && FalseVal == CmpLHS) { in matchSelectPattern() 3782 if (TrueVal == CmpLHS && FalseVal == CmpRHS) { in matchSelectPattern() 3805 if ((CmpLHS == TrueVal && match(FalseVal, m_Neg(m_Specific(CmpLHS)))) || in matchSelectPattern() 3806 (CmpLHS == FalseVal && match(TrueVal, m_Neg(m_Specific(CmpLHS))))) { in matchSelectPattern() 3811 return {(CmpLHS == TrueVal) ? SPF_ABS : SPF_NABS, SPNB_NA, false}; in matchSelectPattern() 3825 (match(TrueVal, m_Not(m_Specific(CmpLHS))) || in matchSelectPattern() 3826 match(CmpLHS, m_Not(m_Specific(TrueVal))))) { in matchSelectPattern() 3827 LHS = TrueVal; in matchSelectPattern() 3910 Value *TrueVal = SI->getTrueValue(); in matchSelectPattern() local [all …]
|
/external/llvm-project/llvm/lib/TableGen/ |
D | TGLexer.h | 61 TrueVal, FalseVal, enumerator
|
/external/llvm-project/llvm/lib/Target/ARM/ |
D | ARMISelLowering.cpp | 4976 SDValue TrueVal, SDValue ARMcc, SDValue CCR, in getCMOV() argument 4981 TrueVal = DAG.getNode(ARMISD::VMOVRRD, dl, in getCMOV() 4982 DAG.getVTList(MVT::i32, MVT::i32), TrueVal); in getCMOV() 4984 SDValue TrueLow = TrueVal.getValue(0); in getCMOV() 4985 SDValue TrueHigh = TrueVal.getValue(1); in getCMOV() 4996 return DAG.getNode(ARMISD::CMOV, dl, VT, FalseVal, TrueVal, ARMcc, CCR, in getCMOV() 5016 const SDValue TrueVal, const SDValue FalseVal, in isLowerSaturate() argument 5019 ((K == LHS && K == TrueVal) || (K == RHS && K == FalseVal))) || in isLowerSaturate() 5021 ((K == RHS && K == TrueVal) || (K == LHS && K == FalseVal))); in isLowerSaturate() 5125 SDValue TrueVal = Op.getOperand(2); in isLowerSaturatingConditional() local [all …]
|