https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483

--- Comment #25 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #24)
> First, the ARITH_INVALID_TYPE should be renamed as it has now a broader
> usage (ARITH_OP_NOT_LITERAL_VALUE is a bit long, ARITH_OP_NOT_CONSTANT is a
> bit misleading, ARITH_OP_NOT_SIMPLIFIED not great either, any other idea?).

I think we should keep the enum ARITH_INVALID_TYPE for those cases where it
is appropriate, and have a different enum for cases where reduce_* does not
succeed.  I was contemplating either ARITH_NOT_REDUCED or ARITH_CANNOT_REDUCE,
and opted for the latter.

> Second, I'm wondering whether the check in reduce_binary_aa shouldn't be
> moved to reduce binary where it would be more clear.

I agree that it is preferable to have checks already in reduce_binary, see
updated patch.  After this one could remove the check from reduce_binary_aa,
as it would be redundant.

> But then it would be
> less consistent with reduce_binary_ac and reduce_binary_ca.

I wouldn't say "less consistent", it just looks less symmetric,
but this is only so as long as you ignore the code in reduce_binary.

Reply via email to