From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1228 invoked by alias); 11 Dec 2009 16:40:31 -0000 Received: (qmail 1177 invoked by uid 48); 11 Dec 2009 16:40:07 -0000 Date: Fri, 11 Dec 2009 16:40:00 -0000 Message-ID: <20091211164007.1176.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug lto/40409] [LTO] ICE in expand_shift, at expmed.c:2263, -O0 vs -Ox misses tree lowering phases In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg01157.txt.bz2 ------- Comment #12 from rguenth at gcc dot gnu dot org 2009-12-11 16:40 ------- I can confirm the ICE from comment #8 still is present on i?86-linux. #1 0x0820c740 in expand_mult (mode=XCmode, op0=0x0, op1=0xb77d3ba0, target=0xb77d3b7c, unsignedp=0) at /home/richard/src/trunk/gcc/expmed.c:3253 3253 gcc_assert (op0); which is because expand_binop seems to fail. 3246 /* This used to use umul_optab if unsigned, but for non-widening multiply 3247 there is no difference between signed and unsigned. */ (gdb) l 3248 op0 = expand_binop (mode, 3249 ! unsignedp 3250 && flag_trapv && (GET_MODE_CLASS(mode) == MODE_INT) 3251 ? smulv_optab : smul_optab, 3252 op0, op1, target, unsignedp, OPTAB_LIB_WIDEN); 3253 gcc_assert (op0); expand_binop (mode=XCmode, binoptab=0x8c72de0, op0=0xb77d3b88, op1=0xb77d3ba0, target=0xb77d3b7c, unsignedp=0, methods=OPTAB_LIB_WIDEN) at /home/richard/src/trunk/gcc/optabs.c:1552 (gdb) call debug_rtx (op0) (mem/s/c:XC (plus:SI (reg/f:SI 54 virtual-stack-vars) (const_int -32 [0xffffffe0])) [0 w+0 S24 A32]) (gdb) call debug_rtx (op1) (mem/s/c:XC (plus:SI (reg/f:SI 54 virtual-stack-vars) (const_int -64 [0xffffffc0])) [0 z+0 S24 A32]) (gdb) call debug_rtx (target) (concat:XC (reg:XF 80 [ D.2040 ]) (reg:XF 81 [ D.2040+12 ])) the optab expansion fails because there is no optab_libfunc for smul_optab and XCmode or TCmode. We arrive here because at -O1 we lower complex operations after writing LTO IL and at -O0 we do so before. So if you combine that we never lower complex operations properly. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Last reconfirmed|2009-09-17 09:44:37 |2009-12-11 16:40:07 date| | Summary|[LTO] ICE in expand_shift, |[LTO] ICE in expand_shift, |at expmed.c:2263 |at expmed.c:2263, -O0 vs -Ox | |misses tree lowering phases http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40409