From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 6F20A3858C2B for ; Sun, 26 Mar 2023 18:01:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6F20A3858C2B 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-x102d.google.com with SMTP id p3-20020a17090a74c300b0023f69bc7a68so6421278pjl.4 for ; Sun, 26 Mar 2023 11:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679853660; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6HtsaCqUdjIJ5yxHKflBHQh9bNt4uyr82MU5JFvI/pQ=; b=al3lpH9zJRKNu1ugdI9T1S6q2AMsqqJZqDuXDw1dm7hRN9GFdOlLUai/1g6bYD5MWI yshMqfC4kQ/1edgaEamIQN/JqlONgLc9+FT5Ocw98+od4zr8mKNbEphqJzvPCHdXB4Dc V8wv6NsnNouMEijwXvbxpQsBmsWNuYGkjlPB1/GK8I0iQ8b3Z3XRta1Mg9G5+PHTb4+s y5Gg8qO/CFsPkP+0ORJPWU+ygyYoLp+JunwZqeedGBnc9rB8j4s3VJqPtq0+cFa1XFQC C2JR4ByLPsQQNb5CDYbE9KJyCQHfPzFWVxpGJTRcxoInZz9xelDxq7v0OdyVXuMsI2U7 NoDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679853660; h=content-transfer-encoding:in-reply-to:from:references: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=6HtsaCqUdjIJ5yxHKflBHQh9bNt4uyr82MU5JFvI/pQ=; b=7S8K5O7nJHKwOMgZYQbo5of6sSXEsmsYR+52syvZSrYYFxyN20puXmrqOKfAqDjYLJ 2wsUJm/b8BnwAYOShNTyMQbJGL5J5nHbhoRy3+uCGi8PO/pQCd+BjetJ/lPfLE8OJ6dQ ZyspMWCjeC5Z55q1cHrR8rknkPtLDRcLvLE1NEag05yZD7QvfyiwxCI3OpZE5zVhAKH1 b9jJ0K4YPiHUVbylEpQNfyjc34A9E4tYq2yQ8JZJbnv5RAXGMgWjoaLAZ65qOW+Zm06k uOA8Shb7CsBMDFZzl8Q8gtf1oOtAzKxF+IjByi8pnKBKINcVMp+hcYFYX+cCmzHryXFO jpHg== X-Gm-Message-State: AAQBX9dUV9gtxtQUn+LAhjwEzd5fqLYiB7TkQSMG26Ag0WaCXOuIh13R htEUcAWFGzQPcOTfJ0Fyz6Yipektt9c= X-Google-Smtp-Source: AKy350aQ9zuUZ1KQyCwjAXCiIST3VOcm3m3Bua+QsF6KAE8xdWktISMrDnhcUhjGlE2Lbbi6pK0VKA== X-Received: by 2002:a17:90b:38cc:b0:23d:4e0e:cf34 with SMTP id nn12-20020a17090b38cc00b0023d4e0ecf34mr10442274pjb.34.1679853659909; Sun, 26 Mar 2023 11:00:59 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id l5-20020a17090a4d4500b00233aacab89esm5890965pjh.48.2023.03.26.11.00.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Mar 2023 11:00:59 -0700 (PDT) Message-ID: Date: Sun, 26 Mar 2023 12:00:58 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] match.pd: Fix up fneg/fadd simplification [PR109230] Content-Language: en-US To: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 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 3/22/23 04:16, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following testcase is miscompiled on aarch64-linux. match.pd > has a simplification for addsub, where it negates one of the vectors > in twice as large floating point element vector (effectively negating every > other element) and then doing addition. > But a requirement for that is that the permutation picks the right elements, > in particular 0, nelts+1, 2, nelts+3, 4, nelts+5, ... > The pattern tests this with sel.series_p (0, 2, 0, 2) check, which as > documented verifies that the even elements of the permutation mask are > identity, but doesn't say anything about the others. > The following patch fixes it by also checking that the odd elements > start at nelts + 1 with the same step of 2. > > Bootstrapped/regtested on aarch64-linux, x86_64-linux and i686-linux, > ok for trunk? > > 2023-03-22 Jakub Jelinek > > PR tree-optimization/109230 > * match.pd (fneg/fadd simplify): Verify also odd permutation indexes. > > * gcc.dg/pr109230.c: New test. OK Jeff