From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sourceware.org (Postfix) with ESMTPS id 168D33861841 for ; Thu, 6 Aug 2020 11:42:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 168D33861841 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=marc.glisse@inria.fr X-IronPort-AV: E=Sophos;i="5.75,441,1589234400"; d="scan'208";a="462653628" Received: from 85-171-191-139.rev.numericable.fr (HELO stedding) ([85.171.191.139]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2020 13:42:08 +0200 Date: Thu, 6 Aug 2020 13:42:08 +0200 (CEST) From: Marc Glisse X-X-Sender: glisse@stedding.saclay.inria.fr To: Christophe Lyon cc: Richard Biener , GCC Patches Subject: Re: VEC_COND_EXPR optimizations v2 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 11:42:23 -0000 On Thu, 6 Aug 2020, Christophe Lyon wrote: > On Thu, 6 Aug 2020 at 11:06, Marc Glisse wrote: >> >> On Thu, 6 Aug 2020, Christophe Lyon wrote: >> >>>>> 2020-08-05 Marc Glisse >>>>> >>>>> PR tree-optimization/95906 >>>>> PR target/70314 >>>>> * match.pd ((c ? a : b) op d, (c ? a : b) op (c ? d : e), >>>>> (v ? w : 0) ? a : b, c1 ? c2 ? a : b : b): New transformations. >>>>> (op (c ? a : b)): Update to match the new transformations. >>>>> >>>>> * gcc.dg/tree-ssa/andnot-2.c: New file. >>>>> * gcc.dg/tree-ssa/pr95906.c: Likewise. >>>>> * gcc.target/i386/pr70314.c: Likewise. >>>>> >>> >>> I think this patch is causing several ICEs on arm-none-linux-gnueabihf >>> --with-cpu cortex-a9 --with-fpu neon-fp16: >>> Executed from: gcc.c-torture/compile/compile.exp >>> gcc.c-torture/compile/20160205-1.c -O3 -fomit-frame-pointer >>> -funroll-loops -fpeel-loops -ftracer -finline-functions (internal >>> compiler error) >>> gcc.c-torture/compile/20160205-1.c -O3 -g (internal compiler error) >>> Executed from: gcc.dg/dg.exp >>> gcc.dg/pr87746.c (internal compiler error) >>> Executed from: gcc.dg/tree-ssa/tree-ssa.exp >>> gcc.dg/tree-ssa/ifc-cd.c (internal compiler error) >> >> I tried a cross from x86_64-linux with current master >> >> .../configure --target=arm-none-linux-gnueabihf --enable-languages=c,c++ --with-system-zlib --disable-nls --with-cpu=cortex-a9 --with-fpu=neon-fp16 >> make >> >> it stops at some point with an error, but I have xgcc and cc1 in >> build/gcc. >> >> I copied 2 of the testcases and compiled >> >> ./xgcc pr87746.c -Ofast -S -B. >> ./xgcc -O3 -fdump-tree-ifcvt-details-blocks-details ifc-cd.c -S -B. >> >> without getting any ICE. > > Sorry for the delay, I had to reproduce the problem manually. >> >> Is there a machine on the compile farm where this is easy to reproduce? > I don't think there is any arm machine in the compile farm. > >> Or could you attach the .optimized dump that corresponds to the >> backtrace below? It looks like we end up with a comparison with an >> unexpected return type. >> > > I've compiled pr87746.c with -fdump-tree-ifcvt-details-blocks-details, > here is the log. > Is that what you need? Thanks. The one from -fdump-tree-optimized would be closer to the ICE. Though it would also be convenient to know which stmt is being expanded when we ICE, etc. Was I on the right track configuring with --target=arm-none-linux-gnueabihf --with-cpu=cortex-a9 --with-fpu=neon-fp16 then compiling without any special option? > Thanks, > > Christophe > >>> Executed from: gcc.dg/vect/vect.exp >>> gcc.dg/vect/pr59591-1.c (internal compiler error) >>> gcc.dg/vect/pr59591-1.c -flto -ffat-lto-objects (internal compiler error) >>> gcc.dg/vect/pr86927.c (internal compiler error) >>> gcc.dg/vect/pr86927.c -flto -ffat-lto-objects (internal compiler error) >>> gcc.dg/vect/slp-cond-5.c (internal compiler error) >>> gcc.dg/vect/slp-cond-5.c -flto -ffat-lto-objects (internal compiler error) >>> gcc.dg/vect/vect-23.c (internal compiler error) >>> gcc.dg/vect/vect-23.c -flto -ffat-lto-objects (internal compiler error) >>> gcc.dg/vect/vect-24.c (internal compiler error) >>> gcc.dg/vect/vect-24.c -flto -ffat-lto-objects (internal compiler error) >>> gcc.dg/vect/vect-cond-reduc-6.c (internal compiler error) >>> gcc.dg/vect/vect-cond-reduc-6.c -flto -ffat-lto-objects (internal >>> compiler error) >>> >>> Backtrace for gcc.c-torture/compile/20160205-1.c -O3 >>> -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer >>> -finline-functions >>> during RTL pass: expand >>> /gcc/testsuite/gcc.c-torture/compile/20160205-1.c:2:5: internal >>> compiler error: in do_store_flag, at expr.c:12259 >>> 0x8feb26 do_store_flag >>> /gcc/expr.c:12259 >>> 0x900201 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, >>> expand_modifier) >>> /gcc/expr.c:9617 >>> 0x908cd0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, >>> expand_modifier, rtx_def**, bool) >>> /gcc/expr.c:10159 >>> 0x91174e expand_expr >>> /gcc/expr.h:282 >>> 0x91174e expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, >>> rtx_def**, expand_modifier) >>> /gcc/expr.c:8065 >>> 0x8ff543 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, >>> expand_modifier) >>> /gcc/expr.c:9950 >>> 0x908cd0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, >>> expand_modifier, rtx_def**, bool) >>> /gcc/expr.c:10159 >>> 0x91174e expand_expr >>> /gcc/expr.h:282 >>> 0x91174e expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, >>> rtx_def**, expand_modifier) >>> /gcc/expr.c:8065 >>> 0x8ff543 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, >>> expand_modifier) >>> /gcc/expr.c:9950 >>> 0x908cd0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, >>> expand_modifier, rtx_def**, bool) >>> /gcc/expr.c:10159 >>> 0x91174e expand_expr >>> /gcc/expr.h:282 >>> 0x91174e expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, >>> rtx_def**, expand_modifier) >>> /gcc/expr.c:8065 >>> 0x8ff543 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, >>> expand_modifier) >>> /gcc/expr.c:9950 >>> 0x908cd0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, >>> expand_modifier, rtx_def**, bool) >>> /gcc/expr.c:10159 >>> 0x91174e expand_expr >>> /gcc/expr.h:282 >>> 0x91174e expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, >>> rtx_def**, expand_modifier) >>> /gcc/expr.c:8065 >>> 0x8ff543 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, >>> expand_modifier) >>> /gcc/expr.c:9950 >>> 0x908cd0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, >>> expand_modifier, rtx_def**, bool) >>> /gcc/expr.c:10159 >>> 0x91174e expand_expr >>> /gcc/expr.h:282 >>> >>> Christophe >> >> -- >> Marc Glisse > -- Marc Glisse