PATCH [target/rs6000]: pr30485

Josh Conner jconner@apple.com
Tue Jan 16 22:47:00 GMT 2007


The rs6000-backend function "rs6000_emit_vector_compare" is unable to
handle unordered floating point comparisons (e.g., UNLE).  In the case
where this showed up (compiling test gcc.dg/vect/pr23816-1.c), it was
occurring because ifcvt was performing an "invert_tree_comparison" from
a GT_EXPR to a UNLE_EXPR, and the tree vectorizer was allowing the
resultant unordered expression to be vectorized.

I briefly considered trying to disallow the frontend from vectorizing
this example, but a) I couldn't find a distinction in the backend
interface that would allow us to tell whether there was vectorizer
support for unordered instructions, and b) I was able to keep these
calls as vector instructions by re-inverting them in the backend vectorizer.

The attached patch was bootstrapped and tested on powerpc-apple-darwin
with c,c++,objc,obj-c++ and no regressions.

OK for mainline?


- Josh

2007-01-16  Josh Conner  <jconner@apple.com>

	PR target/30485
	* config/rs6000/rs6000.c (rs6000_emit_vector_compare): Add
	support for UNLE, UNLT, UNGE, and UNGT.

2007-01-16  Josh Conner  <jconner@apple.com>

	PR target/30485
	* gcc.dg/vect/vect.exp: Add support for no-trapping-math tests.
	* gcc.dg/vect/no-trapping-math-1: New.
	* gcc.dg/vect/no-trapping-math-2: New.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr30485.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070116/89d2cd6d/attachment.ksh>


More information about the Gcc-patches mailing list