From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by sourceware.org (Postfix) with ESMTPS id 85AF738708A8 for ; Tue, 9 Jun 2020 13:42:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 85AF738708A8 Received: by mail-ej1-x641.google.com with SMTP id mb16so22437185ejb.4 for ; Tue, 09 Jun 2020 06:42:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5oBuDBEduUXnDWi7vfq9WqCNKeW6Y+3sRtURUj+1dQ8=; b=r9URsWZrfXvtaTo5iQIchmcCBrIF91cjZ7jsbN4rtbKuZUPLRTLt5ZU8fW6h1a9AhG FzNuYc/vf8zx4T/c0r6WBNL46mPIqEiH7M+J41Xw3N+25I7xYEk4eEv+siPMlNpSTNSJ 5/+q1IZ3/7GxdEoQ1J7w5U3sq+s9Ock9uIdmNhyH6ttVTHPqsUlBqBiKqQ15sQvfulwi 4VEX4iQlU5f+Ad558U4avvG7KfCsX3E2GgZKOXCcK4GlaPtRJgunTcHDVyRwYY5JmoRL JsbvWUxkQw3sr+bcjL9Q+IBE/RslC9OLnL7andP8K9kcP1djV/BTPfxdvHm0LcsDWQBw UieQ== X-Gm-Message-State: AOAM531i0sqYmeW313Km0udiIgwhWitHiBZ+iVR2JRTUoqZaaG4w3wXy ssVL5x1Buib5Kp+tyDJm4QSthvpikEgb+LtPbKI= X-Google-Smtp-Source: ABdhPJzotvWYfncsu2uXnbpxgeXsH13rUzpeFWiiq3+LPPMRwxUO9NxZk2xmWX8lhBYH28CsI7cbap5r4bRan6ENMIA= X-Received: by 2002:a17:906:7f84:: with SMTP id f4mr25030736ejr.482.1591710154605; Tue, 09 Jun 2020 06:42:34 -0700 (PDT) MIME-Version: 1.0 References: <20200529153933.GW31009@gate.crashing.org> <20200529170936.GY31009@gate.crashing.org> <20200529173758.GA31009@gate.crashing.org> <20200530130801.GD31009@gate.crashing.org> <16e3957c-e390-5984-b14e-dd3c70c3bd1c@suse.cz> <20200603182734.GA31009@gate.crashing.org> <3932cb72-4529-6755-bb35-45e11f1c3382@suse.cz> In-Reply-To: <3932cb72-4529-6755-bb35-45e11f1c3382@suse.cz> From: Richard Biener Date: Tue, 9 Jun 2020 15:42:22 +0200 Message-ID: Subject: Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: Segher Boessenkool , GCC Patches , Richard Sandiford , David Edelsohn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Tue, 09 Jun 2020 13:42:37 -0000 On Mon, Jun 8, 2020 at 1:04 PM Martin Li=C5=A1ka wrote: > > Hello. > > Thank you for the approval. There's the patch that defines 4 new DEF_INTE= RNAL_OPTAB_FN. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > It also builds on ppc64le-linux-gnu. > > Ready to be installed? The ChangeLog refers to DEF_INTERNAL_OPTAB_CAN_FAIL which is no longer ther= e. Can you put the isel pass to a separate file please? So this is a first step towards sanitizing VEC_COND_EXPR. There were follo= wups mentioned, namely a) enforcing that VEC_COND_EXPR constraint everywhere, b) isel vector comparisons at the same time since expansion has a vec_cond fallback There's + /* ??? If we do not cleanup EH then we will ICE in + verification. But in reality we have created wrong-code + as we did not properly transition EH info and edges to + the piecewise computations. */ + if (maybe_clean_eh_stmt (gsi_stmt (gsi)) + && gimple_purge_dead_eh_edges (bb)) + cfg_changed =3D true; which of course is bad. It's the comparison that can throw and I guess cur= rent RTL expansion manages to cope by find_many_sub_bbs and friends. But we need to get this correct on GIMPLE here. Note I find it odd this only trig= gers during ISEL - it should trigger during the lowering step which splits the comparison from the VEC_COND_EXPR. An appropriate fix at lowering time would be to insert the VEC_COND_EXPR w/o the condition on the normal outgoing edge and keep the comparison in place of the original VEC_COND_EXPR, moving EH info from the VEC_COND_EXPR to the comparison. I think we need to fix that before merging. Thanks, Richard. > Thanks, > Martin