diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-07-27 13:27:33 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-07-30 12:54:05 +0200 |
commit | 011134dc19dc78fc3780cfc1d79bfc128355608f (patch) | |
tree | 10ab9659aeb88ea34968c392025a0568d822d9e7 /gcc/d/expr.cc | |
parent | baa1226c379a41fa620d77fe5aeb0a0da8163501 (diff) | |
download | gcc-011134dc19dc78fc3780cfc1d79bfc128355608f.zip gcc-011134dc19dc78fc3780cfc1d79bfc128355608f.tar.gz gcc-011134dc19dc78fc3780cfc1d79bfc128355608f.tar.bz2 |
d: Remove dead code from binary_op.
The front-end ensures that both sides have been casted to the same type
before being given to the lowering pass.
gcc/d/ChangeLog:
* expr.cc (binary_op): Remove dead code.
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r-- | gcc/d/expr.cc | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index 73e0abe..e293cf2 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -101,8 +101,6 @@ binary_op (tree_code code, tree type, tree arg0, tree arg1) tree t1 = TREE_TYPE (arg1); tree ret = NULL_TREE; - bool unsignedp = TYPE_UNSIGNED (t0) || TYPE_UNSIGNED (t1); - /* Deal with float mod expressions immediately. */ if (code == FLOAT_MOD_EXPR) return build_float_modulus (type, arg0, arg1); @@ -130,12 +128,6 @@ binary_op (tree_code code, tree type, tree arg0, tree arg1) else ret = fold_build2 (POINTER_DIFF_EXPR, ptrtype, arg0, arg1); } - else if (INTEGRAL_TYPE_P (type) && (TYPE_UNSIGNED (type) != unsignedp)) - { - tree inttype = (unsignedp) - ? d_unsigned_type (type) : d_signed_type (type); - ret = fold_build2 (code, inttype, arg0, arg1); - } else { /* If the operation needs excess precision. */ |