This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Check precision rather than machine mode in STRIP_NOPS and STRIP_SIGN_NOPS
> Do you mean here conversions that are processed by STRIP_NOPS? STRIP_NOPS
> is not used to process all conversions. There are things that are
> converted with other operators like FLOAT_EXPR, FIX_TRUNC_EXPR,
> VIEW_CONVERT_EXPR, etc. This code solely handles NOP_EXPR, CONVERT_EXPR
> and NON_LVALUE_EXPR.
Yes, I was thinking of NOP_EXPR.
> And even if this type of conversion were used for your example, how would
> keeping the check for TYPE_MODE change anything? I am assuming that the
> same machine mode and precision is used for an aggregate type regardless of
> its constness.
I think the precision is not defined for aggregate types. And its mode must
definitely be preserved. So you should only change STRIP_{SIGN_}NOPS for
types that have a precision.
--
Eric Botcazou