From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25396 invoked by alias); 4 Jun 2004 17:47:37 -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 25389 invoked by uid 48); 4 Jun 2004 17:47:36 -0000 Date: Fri, 04 Jun 2004 17:47:00 -0000 From: "fjahanian at apple dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20040604174733.15825.fjahanian@apple.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/15825] New: if-cvt optimisation patch noce_try_sign_mask breaks apple-ppc-darwin port X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg00489.txt.bz2 List-Id: Following patch breaks gcc bootstrap on apple-ppc-darwin. A small test case is attached. Note that it may not ICE on the FSF mainlline. But it ICEd on a locally built compiler with local patches. I have also attached the pattern which when presented to noce_try_sign_mask causes the illegal instruction. 2004-03-09 Roger Sayle Andrew Pinski * ifcvt.c (noce_try_sign_mask): New function to transform "x = (y < 0) ? z : 0" into the equivalent "x = (y >> C) & z". (noce_process_if_block): Call noce_try_sign_mask. unsigned int real_from_integer (long long high, int unsigned_p) { return high < 0 && !unsigned_p; } /Volumes/sandbox/apple-ppc-lno-merge.bootstrap/gcc/stage1/xgcc -B /Volumes/sandbox/ apple-ppc-lno-merge.bootstrap/gcc/stage1 -O2 -c bad.c bad.c: In function `real_from_integer': bad.c:5: error: unrecognizable insn: (insn:HI 67 66 68 0 (set (reg:SI 132) (eq:SI (reg/v:SI 121 [ unsigned_p ]) (const_int 0 [0x0]))) -1 (nil) (expr_list:REG_DEAD (reg/v:SI 121 [ unsigned_p ]) (nil))) bad.c:5: internal compiler error: in extract_insn, at recog.c:2068 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The patter which causes this is: (insn 61 60 32 2 (parallel [ (set (reg:SI 118 [ iftmp.0 ]) (eq:SI (reg/v:SI 121 [ unsigned_p ]) (const_int 0 [0x0]))) (clobber (scratch:SI)) ]) 413 {*rs6000.md:11584} (nil) (expr_list:REG_DEAD (reg/v:SI 121 [ unsigned_p ]) (expr_list:REG_UNUSED (scratch:SI) (nil)))) -- Summary: if-cvt optimisation patch noce_try_sign_mask breaks apple-ppc-darwin port Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fjahanian at apple dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-apple-darwin7.2.0 GCC host triplet: powerpc-apple-darwin7.2.0 GCC target triplet: powerpc-apple-darwin7.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15825