This is the mail archive of the gcc-bugs@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]

[Bug target/17767] [4.0 Regression] MMX intrinsics cause internal compiler error


------- Additional Comments From uros at kss-loka dot si  2004-12-21 13:47 -------
The problem here is that case RTX_COMPARE:/case RTX_COMM_COMPARE: in fold_rtx()
in cse.c is not 'vector safe'. The testcase from comment #3 will trigger these
parts of RTX_COMPARE case:

	      /* See if the two operands are the same.  */
	      if (folded_arg0 == folded_arg1 ...

Operands are the same, (reg:V4HI 62 [ D.1293 ]) and (reg:V4HI 62 [ D.1293 ]).

		  /* Sadly two equal NaNs are not equivalent.  */
		  if (!HONOR_NANS (mode_arg0))
		    return ((code == EQ || code == LE || code == GE
			     || code == LEU || code == GEU || code == UNEQ
			     || code == UNLE || code == UNGE
			     || code == ORDERED)
			    ? true_rtx : false_rtx);


V4HI mode obviously does not HONOR_NANS and (code == EQ). A 'true_rtx' is
returned, but a _vector_ of trues would be more appropriate in this case.

I guess the RTX_COMPARE case should be recoded for vector support, or patch from
comment #7 should be used to prevent VECTOR_MODES from entering this code.

Uros.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17767


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