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: Inline sqrt for ia64


Richard Henderson <rth@redhat.com> writes:

> On Sun, Oct 26, 2003 at 01:57:03AM -0700, Zack Weinberg wrote:
>> +  [ ;; exponent of +1/2 in r2
>> +    (set (match_dup 2) (const_int 65534))
>> +    ;; +1/2 in f8
>> +    (set (match_dup 3) 
>> +         (unspec:XF [(match_dup 2)] UNSPEC_SETF_EXP))
>
> FYI, I've considered defining an HFmode for ia64 that could
> implement this optimization automatically.  The HFmode would
> be defined such that it has 16 bits of exponent and 0 bits
> of fraction.
>
> With this SETF_EXP operation represented as extendhfxf, etc,
> the code in compress_float_constant would automatically 
> notice when this optimization applies.

That's a cute idea, but I wonder if it's overkill for the purpose.
And wouldn't you then have to define arithmetic operations on this
rather peculiar mode?

zw


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