From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1A9893858C41 for ; Mon, 15 Jan 2024 07:26:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A9893858C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A9893858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705303579; cv=none; b=mgx8n7vpNRmbaK3/fDrJYsRJEKcADNbEdS8TZxC9c7IiwgRkqyMMLBhPwMpCe6QAe+WkznsKKVJxY3uuk5jCZKBgReOk1tIWU6CgzUSTSSN+EScN4t81cwTVDgJ55udw5nCj20gQurHL4CgZQc7zuodESqOkmEzk9eMnFP2zV8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705303579; c=relaxed/simple; bh=lUVPmelDIsPUvG+cMs1tdK/qS6VfJqZksCkzpiN2sTI=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=wxra8WqJPGD2BRej64v+g3o1vURKlslKMt19hNztbaU2DMaQdLQFXGwVn49SsIjU9x+RH4maDrPZDNgXrgp0K49azXm1LVOLl/qDCwuGiq0wpYHpeLFwSvcBCQQ7FhKmq0uMhWEIZH+MubUDNTNx3odn6xXI7p+zb3wttwTownk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPHMM-0008EZ-4g for gcc-patches@gcc.gnu.org; Mon, 15 Jan 2024 02:26:16 -0500 Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8DxfesK3qRlpkUAAA--.956S3; Mon, 15 Jan 2024 15:26:02 +0800 (CST) Received: from [10.20.4.107] (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx_c4J3qRl5LoBAA--.9090S3; Mon, 15 Jan 2024 15:26:01 +0800 (CST) Subject: Re: [PATCH v2] LoongArch: testsuite:Added additional vectorization "-mlsx" option. To: Xi Ruoyao , YunQiang Su Cc: chenxiaolong , gcc-patches@gcc.gnu.org, i@xen0n.name, xuchenghua@loongson.cn, schwab@linux-m68k.org, ci_notify@linaro.org References: <20240113072817.31932-1-chenxiaolong@loongson.cn> <36fa3e47dfb106a150f113a300ecff6a7c869237.camel@xry111.site> <8654a1de861c86eda083dced141bc928df3930f4.camel@loongson.cn> <7b74e3f09cd083e489850774f2c85079bd470301.camel@xry111.site> From: chenglulu Message-ID: <8ce49ac9-c668-ef8a-ef03-1a7b06e5ee8c@loongson.cn> Date: Mon, 15 Jan 2024 15:26:01 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <7b74e3f09cd083e489850774f2c85079bd470301.camel@xry111.site> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8Cx_c4J3qRl5LoBAA--.9090S3 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW7tw4DCr13ZFyxKFy8Jr15Jrc_yoW8try8pF ykKasxtFs5GF1xZr429r4vqr4Yk34fGw4qqw1rK34I93ykKrnrXrWFqFW5ua43WFn3Aw1a v3yjqr9xuw1DAFcCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9ab4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07 AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C2 67AKxVWUtVW8ZwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI 8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWU CwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r 1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsG vfC2KfnxnUUI43ZEXa7IU8xuctUUUUU== Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenglulu@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9,NICE_REPLY_A=-0.821,SPF_HELO_NONE=0.001,SPF_PASS=-0.001,T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_FAIL,SPF_HELO_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: 在 2024/1/15 下午2:42, Xi Ruoyao 写道: > On Mon, 2024-01-15 at 14:32 +0800, YunQiang Su wrote: >> Xi Ruoyao 于2024年1月15日周一 12:11写道: >>> On Mon, 2024-01-15 at 09:29 +0800, chenxiaolong wrote: >>>> At 21:13 +0800 on Saturday, 2024-01-13, Xi Ruoyao wrote: >>>>> At 15:28 +0800 on Saturday 2024-01-13, chenxiaolong wrote: >>>>>> gcc/testsuite/ChangeLog: >>>>>> >>>>>>   * gcc.dg/pr104992.c: Added additional "-mlsx" compilation >>>>>> options. >>>>>>   * gcc.dg/signbit-2.c: Dito. >>>>>>   * gcc.dg/tree-ssa/scev-16.c: Dito. >>>>>>   * gfortran.dg/graphite/vect-pr40979.f90: Dito. >>>>>>   * gfortran.dg/vect/fast-math-mgrid-resid.f: Dito. >>>>> I don't feel it right about the changes to pr104992.c and scev-16.c >>>>> because no other architectures add special options there.  Why are we >>>>> so special? >>>> Because on the LoongArch architecture, GCC requires the addition of >>>> vectorization options in order to generate vector code. Use the >>>> check_effective_target_vect_cmdline_needed command in the lib/target- >>>> supports.exp file to set whether the command line option is needed to >>>> enable vectorizations. For example, ia64,x86,aarch64, and riscv >>>> architectures, vectorization is enabled by default. >>> But no.  The default baseline of 32-bit x86 is i686, which is basically >>> a Pentium III launched in 1999 without any vector instructions. >>> >>> We are still missing something here. >>> >> There is a line >>      #define vector __attribute__((vector_size(4*sizeof(int)))) >> I guess it is the syntax needs to be supported. > This is always supported. If the target does not have vector > instructions GCC will just expand vector arithmetic as a loop. > > Maybe we should just move this test into gcc.dg/vect where the framework > automatically add options like -mlsx or -msse2? > The test contents of pr104992.c and scev-16.c are related to vectorization. It would be great if these two could be moved to the gcc.dg/vect directory, but we are not sure if this is allowed to be moved. If it can be moved, how about modifying it in this patch?