This is the mail archive of the gcc@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] |
(my mail file was clobbered so this may not thread properly. see here for context:) http://gcc.gnu.org/ml/gcc/2003-03/msg00802.html
On Fri, Mar 14, 2003 at 10:51:22AM -0800, Dale Johannesen wrote: > For the case where it goes in a register, however, you do. > (It looks like this is not so on Alpha?)
Well, Alpha's a bit different. We can convert to DImode without memory, but truncating to SImode needs special care. Without the above pattern, we'd store the DImode back to the stack, load with an integer register, then store the truncated value.
So the match is for an SImode store to memory.
But the concept should be the same.
> So removing op3 from the above pattern results in another pattern > that combine won't generate, because the original > fix_truncdfsi2 pattern does have the temp, and needs it.
Um, that's wrong. Part of what combine does is to discard clobbers and add them back as needed. Why isn't that happening?
It's not happening because that mechanism only works on clobbers of registers (or scratch regs), not of memory. Comments make clear this is intentional. Thus, the Alpha case isn't really analogous. I could try to make it work on memory clobbers if it is safe to do that. Are the semantics of memory clobbers equivalent to "scratch memory" for that insn only? Or might there be side effects?
Another approach I thought of is to break the fix_trunc differently to begin with:
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |