This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A few simple DImode improvements


Bernd Schmidt <bernds@codesourcery.com> writes:

> On 06/28/2010 08:57 PM, Ian Lance Taylor wrote:
>> As far as I can see, it's not irrelevant there, because the pseudo might
>> be used somewhere else in a case which is NOT_SIMPLE_MOVE.  E.g., a
>> floating point addition.  What am I missing?
>
> Do you want to also verify that the mode of the final destination pseudo
> is DImode (i.e. orig_mode == dest_mode) before omitting the temporary?
> In that case it would be quite unlikely for it to be used in a floating
> point addition, and I think it would still avoid the extra temporary in
> the vast majority of the cases?

I see what you're getting at.  It's unlikely, but it does happen in code
which examines the bits of a floating point number via a union or using
-fno-strict-aliasing and a type cast.  So if that code works correctly
if perhaps less efficiently, then I agree that checking that the mode
class is MODE_INT should work OK here.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]