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]

[patch] Re: [PATCH, x86] Generate vector -1 with pcmpeq


So, apparently the approved patch was never checked in (this was realized this during an audit of our internal patches recently). I found a problem in some testing with the original patch and am going to go ahead and resubmit. I realize that mainline is in regression only right now, but since this was approved some time back and I only have a small fix to the original patch I hope it'll be ok.

The change I made to the original patch (besides making making it fit again) was to require that we use a mode that is understood by the sse instructions when determining whether or not we can generate the instruction. If you have a different mode for the vector (e.g. v2si) then the condition would match, but not generate a valid pattern since it would then be going through the mmx.md machinery instead.

OK? If I missed any of the changes you wanted originally to the predicates lemme know :)

Tested by a bootstrap and test on x86-darwin while using sse2. Built cc1 for x86-linux-gnu.

-eric

2006-06-12  Eric Christopher  <echristo@apple.com>
		     Evan Cheng  <evan.cheng@apple.com>

	* predicates.md (vector_all_ones_operand): New.
	(nonimmediate_or_sse_const_operand): Ditto.
	* config/i386/i386-protos.h (standard_sse_constant_opcode): Declare.
	* config/i386/i386.c (standard_sse_constant_opcode): Define.
	(standard_sse_mode_p): Ditto.
	(standard_sse_constant_p): Add case for -1 vector.
	(ix86_expand_vector_move): Try to use.
	* sse.md (*mov<mode>_internal): Use nonimmediate_or_sse_const_operand.
	Call standard_sse_constant_opcode.
	(*movv4sf_internal): Ditto.
	(*movv2df_internal): Ditto.

Attachment: sse.diff.txt
Description: Text document


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