expand and truncate and 387
Jeffrey A Law
law@cygnus.com
Fri Oct 30 03:25:00 GMT 1998
In message < 19981027145404.34050@atrey.karlin.mff.cuni.cz >you write:
> I am just looking at expand and truncate patterns. Since i387 holds all
> data in same registers and form, they are not required in reg-to-reg cases.
Which expand and truncate patterns? Please try to be precise, use the
names in the MD file if necessary.
If the values in the registers do not change due to a truncate or extension,
then those patterns should be changed to not emit any real instruction for
those operations.
We need to keep the patterns in the insn chain though.
> Because they are extremly slow (done by writing to memory and reading back)
> it is significant to avoid them
So, my question is why are we doing anything for them to begin with.
Can someone else that knows something abou the x86 confirm Jan's assertions?
What is he talking about? Don't we have to worry about rounding and truncation
when changing modes?
> I386.md partially handles this by patterns for each operation with first
> extend, second extend and both extended.
I'm sorry, I have no idea what you are talking about.
> I am not sure whether eliminating truncate in all cases is corret, but at
> least it is good -ffast-math or -mno-ieee-fp candidate.
I disagree. We don't want to go overboard with either option since all that
will do is make them useless.
Right now, those options control domain checks for things like sqrt and basically
enable some optimizations that are not safe in the presense of a NaN.
jeff
More information about the Gcc
mailing list