diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fold-const.cc | 4 | ||||
-rw-r--r-- | gcc/match.pd | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 3aa6851..b05b3ae 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -12564,10 +12564,10 @@ fold_binary_loc (location_t loc, enum tree_code code, tree type, tree targ1 = strip_float_extensions (arg1); tree newtype = TREE_TYPE (targ0); - if (TYPE_PRECISION (TREE_TYPE (targ1)) > TYPE_PRECISION (newtype)) + if (element_precision (TREE_TYPE (targ1)) > element_precision (newtype)) newtype = TREE_TYPE (targ1); - if (TYPE_PRECISION (newtype) < TYPE_PRECISION (TREE_TYPE (arg0))) + if (element_precision (newtype) < element_precision (TREE_TYPE (arg0))) return fold_build2_loc (loc, code, type, fold_convert_loc (loc, newtype, targ0), fold_convert_loc (loc, newtype, targ1)); diff --git a/gcc/match.pd b/gcc/match.pd index 2dd2382..85d562a 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -6034,10 +6034,10 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) type1 = double_type_node; } tree newtype - = (TYPE_PRECISION (TREE_TYPE (@00)) > TYPE_PRECISION (type1) + = (element_precision (TREE_TYPE (@00)) > element_precision (type1) ? TREE_TYPE (@00) : type1); } - (if (TYPE_PRECISION (TREE_TYPE (@0)) > TYPE_PRECISION (newtype)) + (if (element_precision (TREE_TYPE (@0)) > element_precision (newtype)) (cmp (convert:newtype @00) (convert:newtype @10)))))))) |