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: [PATCH RS6000] adding an unsigned SI and a DI together and subtracting an unsigned SI from an DI


Here is the patch as I do not have write access.
I have also added the strings for the `! WORDS_BIG_ENDIAN' case
for *addsidi3_noppc64 and *subsidi3_noppc64.

ChangeLog:
2003-05-14  Andrew Pinski  <pinskia@physics.uc.edu>
	* config/rs6000/rs6000.md (zero_extendsidi2): Always expand.
	(*zero_extendsidi2_noppc64): New insn and split for the non-PPC64
	case.
	(*zero_extendsidi2_ppc64): Add name for the PPC64 case of
	zero_extendsidi2.
	(*addsidi3_noppc64): New instruction for combine to use, which
	simplifies adddi3 with zero_extended SI.
	(*subsidi3_noppc64): Likewise but for subdi3.


Patch:


Attachment: temp.diff
Description: Binary data



Thanks,
Andrew Pinski


On Wednesday, May 14, 2003, at 14:04 US/Eastern, David Edelsohn wrote:


	* config/rs6000/rs6000.md (zero_extendsidi2): Always expand.
	(*zero_extendsidi2_noppc64): New insn and split for the non-PPC64
	case.
	(*zero_extendsidi2_ppc64): Add name for the PPC64 case of
	zero_extendsidi2.
	(*addsidi3_noppc64): New instruction for combine to use, which
	simplifies adddi3 with zero_extended SI.
	(*subsidi3_noppc64): Likewise but for subdi3.

1) Please add the "&& 1" in the define_insn_and_split as pointed out by
   Richard.
2) Please remove the WORDS_BIG_ENDIAN variations from the splitter.
3) Please make sure you format the ChangeLog entry correctly (as above,
   not word-wrapped as a block).
4) Please use "ppc64" and "noppc64" instead of "64" and "no64" in the
   pattern names to be consistent with the other patterns.
5) Please use "*addsidi3_noppc64" and "subsidi3_noppc64" as the pattern
   names instead of appending "sidi" to be consistent with the standard
   mulsidi3 named pattern.

With those changes, you can commit the patch.


The only problem I have with this patch is that it make
`zero_extendsidi2' done in an split which might cause worse code.

The default code is the same as the code produced by the splitter,
except it exposes the subregs in the initial RTL and surrounds it by a
LIBCALL block. Preserving the zero_extend and avoiding the LIBCALL might
actually be a win and probably is not any worse.



Thanks, David




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