llvm.org GIT mirror llvm / 660a1ea
[DAGCombine] Remove repeated variables. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359915 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 4 months ago
1 changed file(s) with 3 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
38163816 // fold (mulhu x, (1 << c)) -> x >> (bitwidth - c)
38173817 if (isConstantOrConstantVector(N1, /*NoOpaques*/ true) &&
38183818 DAG.isKnownToBeAPowerOfTwo(N1) && hasOperation(ISD::SRL, VT)) {
3819 SDLoc DL(N);
38203819 unsigned NumEltBits = VT.getScalarSizeInBits();
38213820 SDValue LogBase2 = BuildLogBase2(N1, DL);
38223821 SDValue SRLAmt = DAG.getNode(
82928291 // This is OK if we don't care about what happens if either operand is a
82938292 // NaN.
82948293 //
8295 if (N0.hasOneUse() && isLegalToCombineMinNumMaxNum(
8296 DAG, N0.getOperand(0), N0.getOperand(1), TLI)) {
8297 ISD::CondCode CC = cast(N0.getOperand(2))->get();
8294 if (N0.hasOneUse() && isLegalToCombineMinNumMaxNum(DAG, N0.getOperand(0),
8295 N0.getOperand(1), TLI)) {
82988296 if (SDValue FMinMax = combineMinNumMaxNum(
8299 DL, VT, N0.getOperand(0), N0.getOperand(1), N1, N2, CC, TLI, DAG))
8297 DL, VT, N0.getOperand(0), N0.getOperand(1), N1, N2, CC, TLI, DAG))
83008298 return FMinMax;
83018299 }
83028300
1007710075
1007810076 // trunc (select c, a, b) -> select c, (trunc a), (trunc b)
1007910077 if (N0.getOpcode() == ISD::SELECT && N0.hasOneUse()) {
10080 EVT SrcVT = N0.getValueType();
1008110078 if ((!LegalOperations || TLI.isOperationLegal(ISD::SELECT, SrcVT)) &&
1008210079 TLI.isTruncateFree(SrcVT, VT)) {
1008310080 SDLoc SL(N0);
1948419481 AddToWorklist(Est.getNode());
1948519482
1948619483 if (Iterations) {
19487 EVT VT = Op.getValueType();
1948819484 SDLoc DL(Op);
1948919485 SDValue FPOne = DAG.getConstantFP(1.0, DL, VT);
1949019486
1964019636 if (!Reciprocal) {
1964119637 // The estimate is now completely wrong if the input was exactly 0.0 or
1964219638 // possibly a denormal. Force the answer to 0.0 for those cases.
19643 EVT VT = Op.getValueType();
1964419639 SDLoc DL(Op);
1964519640 EVT CCVT = getSetCCResultType(VT);
1964619641 ISD::NodeType SelOpcode = VT.isVector() ? ISD::VSELECT : ISD::SELECT;