From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 15D9C3858409 for ; Thu, 13 Apr 2023 12:35:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15D9C3858409 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102c.google.com with SMTP id cm18-20020a17090afa1200b0024713adf69dso2439764pjb.3 for ; Thu, 13 Apr 2023 05:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681389310; x=1683981310; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=e8cY9tp/yJ+Y5mJF9PB8IUXLX6BAG5qLSxiEpi1yfNg=; b=KNGYazTyy19Yn8YEChON44IO4YSVzgkaTzilNsaVmJ/wogwsLu5zZnZ5qS8+Vh5cVu 41n0+I6097Z9ds8HSYnB6n4lPfvYPhSDQu4/hy8lzQgOxSnZKrv6HNvbZVPp3Nq5hu12 No/ietK4So/u8vul36YU9EdyTYB3bsIRXmb8AnfVMDTJh6VizYfhpVJzLIjL0EFgMqOZ Ge16RKZjRV3iQmBDEWi+hAWrI8YzWFiF1wKOcFgzEJQ+vKkKn2Fd9rVDMEdQ7F8Pcvt8 v8HKzpCyUuUnaX1r1edZPKSiLoK/k69CDbNdpDDuQMyRa3a7wQozyh6heysFwXTHkF35 gmlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681389310; x=1683981310; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e8cY9tp/yJ+Y5mJF9PB8IUXLX6BAG5qLSxiEpi1yfNg=; b=iZ4oByDK3Scp42/gn2nLzgJD4N1nW2L7PXuQfN+T08xPIYWcfOrv2eE76Wct1BoX6h EckK56LUSY8WfTptUQwv1viZfB1xL561mWqsMWhklu7RFkKBkGhn9oAcxeKLvHf4VTUe a4ZC14cCZJk21bz94AYlqDMlAuZUE6fO/0TdHN3UjmljseXIXlAn3+V6ho96A3gSWe7v bZ9RF2Uh5nmlLeRyIT8H+nTU8MTF/5124nvtnyB7IXBVNHTLBcZ/cUbLnkhgjWXVuaDw KDEde/mzP0cCIpB8UjaFcZHR1JVfXq6ha5nV2Tmt9KV4C5RxjboWyJmGBOtMnG/arsou Drwg== X-Gm-Message-State: AAQBX9cMsxGz8In1Ay6Cq5qhMqm5hO+RNxTEuBFlmjwnraIgA5i+CfIT IKNxwrxgt3Kubw+y1H5my9Q= X-Google-Smtp-Source: AKy350aJmDOgqpv40X6VDK3ItiDkNJ4QYXssjChdOHceB4Fg8u0y2GnZHkbMS/q51vjCIS+bLkfgIw== X-Received: by 2002:a17:903:120c:b0:1a3:d392:2f29 with SMTP id l12-20020a170903120c00b001a3d3922f29mr2894602plh.20.1681389309594; Thu, 13 Apr 2023 05:35:09 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id y19-20020a1709027c9300b0019ea9e5815bsm1415424pll.45.2023.04.13.05.35.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Apr 2023 05:35:09 -0700 (PDT) Message-ID: <811f7d5a-bb26-b9d1-ed09-7d404b9c7c7f@gmail.com> Date: Thu, 13 Apr 2023 06:35:07 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] combine, v4: Fix AND handling for WORD_REGISTER_OPERATIONS targets [PR109040] Content-Language: en-US To: Segher Boessenkool Cc: Jakub Jelinek , Eric Botcazou , gcc-patches@gcc.gnu.org, Richard Biener , Richard Sandiford References: <2220543.iZASKD2KPV@fomalhaut> <3412470.QJadu78ljV@fomalhaut> <8d3c3861-c291-e762-a2a8-0b520f39a7e3@gmail.com> <965831db-ac9e-cc5e-3459-08b6b70fd577@gmail.com> <0760f780-ba7d-3476-1d9a-7b5f3063d63b@gmail.com> <20230413105755.GD19790@gate.crashing.org> From: Jeff Law In-Reply-To: <20230413105755.GD19790@gate.crashing.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 4/13/23 04:57, Segher Boessenkool wrote: > On Wed, Apr 12, 2023 at 10:05:08PM -0600, Jeff Law wrote: >> On 4/12/23 10:58, Jakub Jelinek wrote: >>> Seems my cross defaulted to 32-bit compilation, reproduced it with >>> additional -mabi=lp64 -march=rv64gv even on the pr108947.c test. >>> So, let's include that test in the patch too: >>> >>> 2023-04-12 Jeff Law >>> Jakub Jelinek >>> >>> PR target/108947 >>> PR target/109040 >>> * combine.cc (simplify_and_const_int_1): Compute nonzero_bits in >>> word_mode rather than mode if WORD_REGISTER_OPERATIONS and mode is >>> smaller than word_mode. >>> * simplify-rtx.cc (simplify_context::simplify_binary_operation_1) >>> : Likewise. >>> >>> * gcc.dg/pr108947.c: New test. >>> * gcc.c-torture/execute/pr109040.c: New test. >> Bootstrap of the v3 patch has completed. Regression testing is still >> spinning. It should be done and waiting for me when I wake up in the >> morning. > > It's still okay for trunk (of course) if the bootstrap doesn't fail (of > course). Thanks guys! Bootstrap was successful with v3, but there's hundreds of testsuite failures due to the simplify-rtx hunk. compile/20070520-1.c for example when compiled with: -O3 -funroll-loops -march=rv64gc -mabi=lp64d Thursdays are my hell day. It's unlikely I'd be able to look at this at all today. typedef unsigned char uint8_t; extern uint8_t ff_cropTbl[256 + 2 * 1024]; void ff_pred8x8_plane_c(uint8_t *src, int stride){ int j, k; int a; uint8_t *cm = ff_cropTbl + 1024; const uint8_t * const src0 = src+3-stride; const uint8_t *src1 = src+4*stride-1; const uint8_t *src2 = src1-2*stride; int H = src0[1] - src0[-1]; int V = src1[0] - src2[ 0]; for(k=2; k<=4; ++k) { src1 += stride; src2 -= stride; H += k*(src0[k] - src0[-k]); V += k*(src1[0] - src2[ 0]); } H = ( 17*H+16 ) >> 5; V = ( 17*V+16 ) >> 5; a = 16*(src1[0] + src2[8]+1) - 3*(V+H); for(j=8; j>0; --j) { int b = a; a += V; src[0] = cm[ (b ) >> 5 ]; src[1] = cm[ (b+ H) >> 5 ]; src[2] = cm[ (b+2*H) >> 5 ]; src[3] = cm[ (b+3*H) >> 5 ]; src[4] = cm[ (b+4*H) >> 5 ]; src[5] = cm[ (b+5*H) >> 5 ]; src[6] = cm[ (b+6*H) >> 5 ]; src[7] = cm[ (b+7*H) >> 5 ]; src += stride; } } Jeff