Lines Matching defs:and

8 GCC is free software; you can redistribute it and/or modify it under
24 @@ representation for "struct tree_int_cst" and "struct tree_real_cst".
25 @@ Perhaps the routines could also be used for bc/dc, and made a lib.
32 and force_fit_type.
34 fold takes a tree as argument and returns a simplified tree.
37 and two operands that are trees, and produces a tree for the
40 size_int takes an integer value, and creates a tree constant
43 force_fit_type takes a constant, an overflowable flag and prior
44 overflow indicators. It forces the value to fit the type and sets
45 TREE_OVERFLOW and TREE_CONSTANT_OVERFLOW as appropriate. */
70 on relational comparison operators, such as AND and OR. */
147 /* We know that A1 + B1 = SUM1, using 2's complement arithmetic and ignoring
148 overflow. Suppose A, B and SUM have the same respective signs as A1, B1,
149 and SUM1. Then this yields nonzero if overflow occurred during the
152 Overflow occurs if A and B have the same sign, but A and SUM differ in
153 sign. Use `^' to test whether signs differ, and `< 0' to isolate the
170 LOW and HI are the integer, as two `HOST_WIDE_INT' pieces.
184 The integer is stored into *LOW and *HI as two `HOST_WIDE_INT' pieces. */
203 or OVERFLOWABLE is >0 and signed overflow occurs
204 or OVERFLOWABLE is <0 and any overflow occurs
301 One argument is L1 and H1; the other, L2 and H2.
302 The value is stored as two `HOST_WIDE_INT' pieces in *LV and *HV. */
327 The argument is given as two `HOST_WIDE_INT' pieces in L1 and H1.
328 The value is stored as two `HOST_WIDE_INT' pieces in *LV and *HV. */
352 One argument is L1 and H1; the other, L2 and H2.
353 The value is stored as two `HOST_WIDE_INT' pieces in *LV and *HV. */
417 Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
479 Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
541 Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
563 Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
585 for a quotient (stored in *LQUO, *HQUO) and remainder (in *LREM, *HREM).
618 /* Calculate quotient sign and convert operands to unsigned. */
692 { /* scale divisor and dividend */
719 quo_est is never low and is at most 2 high. */
729 /* Refine quo_est so it's usually correct, and at most one high. */
737 divisor by QUO_EST and subtracting from the remaining dividend.
750 /* If quo_est was high by one, then num[i] went negative and
863 of type CODE and returns the quotient.
923 and ISSUE is true, then issue the warning if appropriate. STMT is
927 the smaller of CODE and the deferred code when deciding whether to
1131 /* In general we can't negate A / B, because if A is INT_MIN and
1133 and actually traps on some architectures. But if overflow is
1282 /* In general we can't negate A / B, because if A is INT_MIN and
1284 and actually traps on some architectures. But if overflow is
1386 /* Split a tree IN into a constant, literal and variable parts that could be
1390 the literal in *LITP and return the variable part. If a part isn't
1392 return the entire tree as the variable part and the other parts as null.
1404 same type as IN, but they will have the same signedness and mode. */
1423 /* We can associate addition and subtraction together (even
1481 /* Re-associate trees split by the above function. T1 and T2 are either
1483 we build an operation, do it in TYPE and with CODE. */
1525 /* Combine two integer constants ARG1 and ARG2 under operation CODE
1707 /* Combine two constants ARG1 and ARG2 under operation CODE to produce a new
1708 constant. We assume ARG1 and ARG2 have the same data type, or at least
1709 are the same kind of constant and the same machine mode. Return zero if
1758 /* Don't perform operation if we honor signaling NaNs and
1782 the result has overflowed and flag_trapping_math. */
1791 result may dependent upon the run-time rounding mode and
1885 /* Combine operands OP1 and OP2 with arithmetic operation CODE. CODE
1887 Both must be the same type integer type and it must be a size type.
1940 type and subtract. The hardware will do the right thing with any
1946 /* If ARG0 is larger than ARG1, subtract and return the result in CTYPE.
1948 overflow) and negate (which can't either). Special-case a result
1998 that IEEE NaNs are mapped to zero and values that overflow
2000 INT_MAX are mapped to INT_MAX, and values less than INT_MIN
2002 C and C++ standards that simply state that the behavior of
2031 /* If R is NaN, return zero and show we have an overflow. */
2353 comparisons, except for NE_EXPR and EQ_EXPR, so we receive a machine mode
2520 and RCODE on the identical operands LL_ARG and LR_ARG. Take into account
2521 the possibility of trapping if the mode has NaNs, and return NULL_TREE
2550 /* Eliminate unordered comparisons, as well as LTGT and ORD
2560 /* Check that the original operation and the optimized ones will trap
2582 /* If the comparison was short-circuited, and only the RHS
2622 (1) -0.0 and 0.0 are distinguishable, but -0.0==0.0, and
2663 a match and compare that variant. */
2678 /* This is needed for conversions and for COMPONENT_REF.
2679 Might as well play it safe and always test this. */
2685 /* If ARG0 and ARG1 are the same SAVE_EXPR, they are necessarily equal.
2757 /* Define macros to test an operand from arg0 and arg1 for equality and a
2758 variant that allows null and views null as being different from any
2771 /* Two conversions are equal only if signedness and modes match. */
2821 /* Operands 2 and 3 may be null.
2899 /* If we get here and both argument lists are exhausted
2942 /* Discard any conversions that don't change the modes of ARG0 and ARG1
2943 and see if the inner values are the same. This removes any
2951 /* Duplicate what shorten_compare does to ARG1 and see if that gives the
2982 two different values, which will be stored in *CVAL1 and *CVAL2; if
2986 the expression and save_expr needs to be called with CVAL1 and CVAL2.
3078 /* ARG is a tree that is known to contain just arithmetic operations and
3080 any occurrence of OLD0 as an operand of a comparison and likewise for
3081 NEW1 and OLD1. */
3138 /* We need to check both for exact equality and tree equality. The
3162 converted to TYPE and OMITTED was previously an operand of the expression
3193 converted to TYPE and OMITTED1 and OMITTED2 were previously operands
3197 If both OMITTED1 and OMITTED2 have side effects, OMITTED1 is
3367 /* Given a bit-wise operation CODE applied to ARG0 and ARG1, see if both
3369 distribute the bit operations to save an operation and possibly two if
3372 Further simplification will occur if B and C are constants.
3419 /* Knowing that ARG0 and ARG1 are both RDIV_EXPRs, simplify a binary operation
3489 There are two cases: First is a compare against a constant and the
3496 BIT_AND_EXPR of a mask and a byte, halfword, or word of the operand being
3498 similar mask and compare the result of the ANDs.
3501 COMPARE_TYPE is the type of the comparison, and LHS and RHS
3502 are the left and right operands of the comparison, respectively.
3524 extraction at all and so can do nothing. We also don't want to
3536 sizes, and signedness are the same. */
3556 /* Set signed and unsigned types of the precision of this mode for the
3561 /* Compute the bit position and size for the new reference and our offset
3583 and return. */
3595 big for the field. Warn and return a tree of for 0 (false) if so. We do
3634 appropriate number of bits and mask it with the computed mask
3853 /* The following functions are subroutines to fold_range_test and allow it to
3858 and
3864 a range, using a variable named like IN_P, and then describe the
3865 range with a lower and upper bound. If one of the bounds is omitted,
3873 possible value and ending at 10, in other words, being greater than 10.
3874 The range "+ [-, -]" is always true and hence the range "- [-, -]" is
3878 manner so neither a missing bound nor "true" and "false" need to be
3881 /* Return the result of applying CODE to ARG0 and ARG1, but handle the case
3882 of ARG0 and/or ARG1 being omitted, meaning an unlimited range. UPPER0_P
3883 and UPPER1_P are nonzero if the respective argument is an upper bound
3884 and zero for a lower. TYPE, if nonzero, is the type of the result; it
3912 /* Set SGN[01] to -1 if ARG[01] is a lower bound, 1 for upper, and 0
3949 variables denoted by PIN_P, PLOW, and PHIGH. Return the expression
3950 actually being tested. *PLOW and *PHIGH will be made of the same
3952 will most likely not be returning a useful value and range. Set
3967 /* Start with simply saying "EXP != 0" and then look at the code of EXP
3968 and see if we can refine the range. Some of the cases below may not
4005 and if the second operand is an integer constant. Note that
4090 /* If flag_wrapv and ARG0_TYPE is signed, then we cannot
4099 and this is exactly the right thing. */
4112 value thus making n_high < n_low, and normalize it. */
4156 The tests above have already verified that LOW and HIGH
4183 /* If the low bound is specified, "and" the range with the
4239 /* Given a range, LOW, HIGH, and IN_P, an expression, EXP, and a result
4470 first, and the ranges begin at the same place, we go from just after
4472 range is not a subset of the first, or if it is a subset and both
4474 first range and ends just before the second range.
4511 the range starts just after the first range and ends at the
4536 starts at the beginning of the first range and ends at the end of the
4594 /* The ranges might be also adjacent between the maximum and
4596 - [{min,-}, x] and - [y, {max,-}] ranges where x + 1 < y
4624 A op B ? A : C, where ARG0, ARG1 and ARG2 are the three operands
4661 NaN, since the two alternatives (A and -A) are also NaNs. */
4715 is then true, and A == 0 is false. */
4735 of signed zeros. For example, if A and B are zeros of
4738 expressions give different results for (A=+0, B=-0) and
4743 be false, and B will indeed be chosen. In the case of the
4745 and A will be chosen.
4747 The conversions to max() and min() are not correct if B is
4748 a number and A is not. The conditions in the original
4750 and max() versions would give a NaN instead. */
4824 /* If this is A op C1 ? A : C2 with C1 and C2 constant integers,
4827 out as a MIN or MAX and been transformed by this function.
4925 /* If both expressions are the same, if we can merge the ranges, and we
4943 short-circuited branch and the underlying object on both sides
4986 bit value. Arrange things so the extra bits will be set to zero if and
5010 zero or one, and the conversion to a signed type can never overflow.
5028 /* Find ways of folding logical expressions of LHS and RHS:
5032 and evaluate the RHS unconditionally.
5034 For example, if we have p->a == 2 && p->b == 4 and we can make an
5035 object large enough to span both A and B, we can do this with a comparison
5041 We check for both normal comparisons and the BIT_AND_EXPRs made this by
5042 function and the one above.
5047 TRUTH_TYPE is the type of the logical operand and LHS and RHS are its
5056 the comparisons are NE_EXPR. If this is the "and", we can do something
5117 /* Simplify (x<y) && (x==y) into (x<=y) and related optimizations. */
5144 /* If the RHS can be evaluated unconditionally and its operands are
5262 the left. If we can't, fail. Otherwise, update all constants and masks
5321 between the left and right sides. */
5357 same size and the bits being compared are in the same position
5358 then we can do this by masking both and comparing the masked
5447 warning (0, "%<and%> of mutually exclusive equal-tests is always 0");
5498 and GT_EXPR, doing the rest with recursive calls using logical
5570 modulus (CODE says which and what kind of divide or modulus) by a
5597 something interesting and (2) we've probably processed it before
5643 or (for divide and modulus) if it is a multiple of our constant. */
5656 /* ... and is unsigned, and its type is smaller than ctype,
5674 /* Pass the constant down and see if we can make a simplification. If
5778 /* If this was a subtraction, negate OP1 and set it to be an addition.
5787 some of the division and remainder types while for others we need
5801 of our constant, do the operation and verify it doesn't overflow. */
5824 apply our operation to the second side and reform the PLUS. */
5829 apply the distributive law to commute the multiply and addition
5853 /* If we can extract our operation from the LHS, do so and return a
5922 1), and is of the indicated TYPE. */
5936 /* Return true if expr looks like an ARRAY_REF and set base and
5953 /* Strip NOP_EXPRs here because the C frontends and/or
5970 zero offset and as such do not care about the ADDR_EXPR
5971 type and strip possible nops from it. */
6009 expression, and ARG to `a'. If COND_FIRST_P is nonzero, then the
6027 arg in a SAVE_EXPR, and the operation can be simplified on at least
6079 If !NEGATE, return true if ADDEND is +/-0.0 and, for all X of type
6083 X + 0 and X - 0 both give X when X is NaN, infinite, or nonzero
6084 and finite. The problematic cases are when X is zero, and its mode
6103 /* Treat x + -0 as x - 0 and x - -0 as x + 0. */
6108 /* The mode has signed zeros, and we have to honor their sign.
6120 is the type of the result and ARG0 and ARG1 are the operands of the
6124 can be made, and NULL_TREE otherwise. */
6144 /* sqrt(x) > y is always true, if y is negative and we
6168 and we don't care about infinities. */
6186 value and we don't care about NaNs or Infinities. */
6190 /* sqrt(x) < y is x != +Inf when y is very large and we
6196 /* sqrt(x) < y is x >= 0 when y is very large and we
6245 GE_EXPR or LE_EXPR. TYPE is the type of the result and ARG0 and ARG1
6249 can be made, and NULL_TREE otherwise. */
6290 /* x == +Inf and x >= +Inf are always equal to x > DBL_MAX. */
6308 /* The transformation below creates non-gimple code and thus is
6329 GE_EXPR or LE_EXPR. TYPE is the type of the result and ARG0 and ARG1
6333 can be made, and NULL_TREE otherwise. */
6487 /* If CODE with arguments ARG0 and ARG1 represents a single bit
6521 /* If CODE with arguments ARG0 and ARG1 represents a single bit
6523 the test using shifts and logical operations. Otherwise return
6554 /* If INNER is a right shift of a constant and it plus BITNUM does
6555 not overflow, adjust BITNUM and INNER. */
6602 /* Check whether we are allowed to reorder operands arg0 and arg1,
6616 /* Test whether it is preferable two swap two operands, ARG0 and
6617 ARG1, for example because ARG0 is an integer constant and ARG1
6660 for commutative and comparison operators. Ensuring a canonical
6820 step of the array. Reconstructs s and delta in the case of s * delta
6821 being an integer constant (and thus already folded).
6835 and an INTEGER_CST s. */
6902 and replace the index. */
7440 /* Check that the host and target are sane. */
7452 /* Fold a unary expression of code CODE and type TYPE with operand
7509 /* If this was a conversion, and all we did was to move into
7511 it is a conversion from integer to integer and the
7513 conversion is cheap and may be optimized away by combine,
7516 conversion out and then back in. */
7570 /* If we have (type) (a CMP b) and type is an integral type, return
7611 /* Likewise, if the intermediate and final types are either both
7613 it is wider than the final type and doesn't change the signedness
7639 - the intermediate type is narrower than both initial and
7641 - the intermediate type and innermost type differ in signedness,
7642 and the outermost type is wider than the intermediate, or
7643 - the initial type is a pointer type and the precisions of the
7644 intermediate and final types differ, or
7645 - the final type is a pointer type and the precisions of the
7646 initial and intermediate types differ.
7647 - the final type is a pointer type and the initial type not
7648 - the initial type is a pointer to an array and the final type
7673 /* Handle (T *)&A.B.C for A being of type T and B and C
7675 C++ upcasting and then accessing the base. */
7720 tree and = op0;
7721 tree and0 = TREE_OPERAND (and, 0), and1 = TREE_OPERAND (and, 1);
7724 if (TYPE_UNSIGNED (TREE_TYPE (and))
7726 <= TYPE_PRECISION (TREE_TYPE (and))))
7761 /* Convert (T1)((T2)X op Y) into (T1)X op Y, for pointer types T1 and
7781 /* Convert (T1)(~(T2)X) into ~(T1)X if T1 and T2 are integral types
7782 of the same precision, and X is a integer type not narrower than
7900 and its values must be 0 or 1.
7965 /* Fold a binary expression of code CODE and type TYPE with operands
7966 OP0 and OP1, containing either a MIN-MAX or a MAX-MIN combination.
8010 operators (EQ_EXPR and NE_EXPR) and the ordering operators
8011 (LT_EXPR, LE_EXPR, GE_EXPR and GT_EXPR). Callers other than
8013 tree code CODE and type TYPE with operands OP0 and OP1. Return
8067 restricted to retain within an object and overflow on pointer differences
8068 is undefined as of 6.5.6/8 and /9 with respect to the signed ptrdiff_t.
8071 and therefore TYPE_OVERFLOW_WRAPS returns true for them. That is
8089 type size and ARRAY_REF offsets which are properly sign or
8137 /* IEEE doesn't distinguish +0 and -0 in comparisons. */
8332 and constants, we can simplify it. There are only three cases
8390 value for `>', the next for '=', and the low for '<'. */
8429 type and component to a comparison of the address of the base
8430 object. In short, &x->a OP &y->a to x OP y and
8449 /* We can fold X/C1 op C2 where C1 and C2 are integer constants
8505 /* Fold a binary expression of code CODE and type TYPE with operands
8506 OP0 and OP1. Return the folded expression if folding is
8570 /* If this is a commutative operation, and ARG0 is a constant, move it
8576 /* ARG0 is the first operand of EXPR, and ARG1 is the second operand.
8586 one of the operands is a comparison and the other is a comparison, a
8590 TRUTH_XOR_EXPR and an EQ_EXPR to the inversion of a TRUTH_XOR_EXPR. */
8684 /* If we are adding two BIT_AND_EXPR's, both of which are and'ing
8685 with a constant, and the two constants have no bits in common,
8758 /* See if ARG1 is zero and X + ARG1 reduces to X. */
8822 /* (A << C1) + (A >> C2) if A is unsigned and C1+C2 is the size of A
8824 /* (A << B) + (A >> (Z - B)) if A is unsigned and Z is the size of A
8904 /* Split both trees into variables, constants, and literals. Then
8907 literals being recombined later and of generating relocatable
8908 expressions for the sum of a constant and literal. */
8934 nothing has changed and we risk infinite recursion. */
9000 /* (-A) - B -> (-B) - A where B is easily negated and we can swap. */
9063 /* See if ARG1 is zero and X - ARG1 reduces to X. */
9068 ARG0 is zero and X + ARG0 reduces to X, since that would mean
9520 /* Convert (or (not arg0) (not arg1)) to (not (and (arg0) (arg1))).
9567 /* If we are XORing two BIT_AND_EXPR's, both of which are and'ing
9568 with a constant, and the two constants have no bits in common,
9813 /* Convert (and (not arg0) (not arg1)) to (not (or (arg0) (arg1))).
9896 /* Find the reciprocal if optimizing and the result is exact. */
10075 /* Simplify A / (B << N) where A and B are positive and B is
10115 /* Convert -A / -B to A / B when the type is signed and overflow is
10145 Note that only CEIL_DIV_EXPR and FLOOR_DIV_EXPR are rewritten now.
10176 proper warnings and errors. */
10193 i.e. "X % C" into "X & (C - 1)", if X and C are positive. */
10339 /* If we have a rotate of a bit operation with the rotate count and
10392 and their values must be 0 or 1.
10446 truth and/or operations and the transformation will still be
10448 ANDIF and ORIF operators. If B contains side effects, this
10492 rhs. Then try to merge our lhs and rhs. */
10505 and their values must be 0 or true.
10631 It is both wasteful and incorrect to call operand_equal_p
10667 /* If we have X - Y == 0, we can convert that to X == Y and similarly
10679 /* If this is an EQ or NE comparison with zero and ARG0 is
10713 the MOD operation unsigned since it is simpler and equivalent. */
10733 /* Fold ((X >> C1) & C2) == 0 and ((X >> C1) & C2) != 0 where
10734 C1 is a valid shift constant, and C2 is a power of two, i.e.
10763 ((X >> C1) & C2) != 0 is rewritten as X < 0, and
10769 ((X >> C1) & C2) != 0 is rewritten as (X,false), and
10796 /* If we have (A & C) != 0 or (A & C) == 0 and C is the sign
10893 /* (X ^ Y) == 0 becomes X == Y, and (X ^ Y) != 0 becomes X != Y. */
10919 /* Fold (~X & C) == 0 into (X & C) != 0 and (~X & C) != 0 into
11056 /* Convert X + c > X and X - c < X to true for integers. */
11081 /* Convert X + c <= X and X - c >= X to false for integers. */
11108 /* Change X >= C to X > (C - 1) and X < C to X <= (C - 1) if C > 0.
11203 /* The GE_EXPR and LT_EXPR cases above are not normally
11274 and X >= signed_max+1 because previous transformations. */
11289 well not be faster than doing the ABS and one comparison.
11291 and a comparison, and is probably faster. */
11316 "absolute value and zero"),
11330 "absolute value and zero"),
11336 and similarly for >= into !=. */
11483 /* Fold a ternary expression of code CODE and type TYPE with operands
11484 OP0, OP1, and OP2. Return the folded expression if folding is
11555 simpler expression, depending on the operation and the values
11556 of B and C. Signed zeros prevent all of these transformations,
11559 Also try swapping the arguments and inverting the conditional. */
11720 /* Convert A ? B : 0 into A && B if A and B are truth values. */
11728 /* Convert A ? B : 1 into !A || B if A and B are truth values. */
11741 /* Convert A ? 0 : B into !A && B if A and B are truth values. */
11754 /* Convert A ? 1 : B into A || B if A and B are truth values. */
11803 /* Perform constant folding and related simplification of EXPR.
11805 and application of the associative law.
11873 and after actual fold call to see if fold did not accidentally
12110 operands OP0 and OP1. Return a folded expression if successful.
12112 with operands OP0 and OP1. */
12164 operands OP0, OP1, and OP2. Return a folded expression if
12166 type TYPE with operands OP0, OP1, and OP2. */
12232 /* Perform constant folding and related simplification of initializer
12234 potential run-time traps and exceptions that fold must preserve. */
12299 could surely be made more general, and expanded to do what the *_DIV_EXPR's
12332 (where the same SAVE_EXPR (J) is used in the original and the
12347 /* Bitwise and provides a power of two multiple. If the mask is
12454 /* zero_extend(x) + zero_extend(y) is non-negative if x and y are
12455 both unsigned and at least 2 bits shorter than the result. */
12484 /* zero_extend(x) * zero_extend(y) is non-negative if x and y are
12485 both unsigned and their total bits is shorter than the result. */
12706 have a signed:1 type (where the value is -1 and 0). */
12711 /* We don't know sign of `t', so be conservative and return false. */
12734 /* Return true when T is an address and is known to be nonzero.
12780 /* One of operands must be positive and the other non-negative. */
12914 /* Return true when T is an address and is known to be nonzero.
12932 /* Given the components of a binary expression CODE, TYPE, OP0 and OP1,
12947 /* Given the components of a unary expression CODE, TYPE and OP0,
12988 and its mode is QI. Without the conversion,l (ARRAY
13119 /* Given CODE, a relational operator, the target type, TYPE and two
13120 constant operands OP0 and OP1, return the result of the
13194 /* From here on we only handle LT, LE, GT, GE, EQ and NE.
13196 To compute GT, swap the arguments and do LT.
13197 To compute GE, do LT and invert the result.
13198 To compute LE, swap the arguments, do LT and invert the result.
13199 To compute NE, do EQ and invert the result.
13201 Therefore, the code below must handle only EQ and LT. */
13309 /* Given a pointer value OP0 and a type TYPE, return a simplified version
13560 /* Returns the pointer to the base of the object addressed by EXP and
13562 to PBITPOS and POFFSET. */
13590 /* Returns true if addresses of E1 and E2 differ by a constant, false