From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10028 invoked by alias); 21 Dec 2004 13:49:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8182 invoked by uid 48); 21 Dec 2004 13:47:15 -0000 Date: Tue, 21 Dec 2004 13:49:00 -0000 Message-ID: <20041221134715.8181.qmail@sourceware.org> From: "uros at kss-loka dot si" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041001072853.17767.jochang@gmail.com> References: <20041001072853.17767.jochang@gmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/17767] [4.0 Regression] MMX intrinsics cause internal compiler error X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg03036.txt.bz2 List-Id: ------- 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