From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 350673858D35 for ; Thu, 7 Sep 2023 02:38:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 350673858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.20.4.86]) by gateway (Coremail) with SMTP id _____8AxTeunN_lkGQIhAA--.60498S3; Thu, 07 Sep 2023 10:38:31 +0800 (CST) Received: from [10.20.4.86] (unknown [10.20.4.86]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Ax8uSmN_lkJN1vAA--.5757S3; Thu, 07 Sep 2023 10:38:30 +0800 (CST) Message-ID: <80c315eab9316df9801b2f82ccb4de44f556c220.camel@loongson.cn> Subject: Re: [PATCH v1 4/4] LoongArch: Add tests for Loongson SX floating-point conversion instructions. From: chenxiaolong To: Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn Date: Thu, 07 Sep 2023 10:38:30 +0800 In-Reply-To: <1092975a1cdc4f1bd357d5499540faf755b65854.camel@xry111.site> References: <20230906104537.51583-1-chenxiaolong@loongson.cn> <1092975a1cdc4f1bd357d5499540faf755b65854.camel@xry111.site> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:AQAAf8Ax8uSmN_lkJN1vAA--.5757S3 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAHBWT3-DUJ-wAAsv X-Coremail-Antispam: 1Uk129KBj9xXoW7JryDuw1rGrW5uF1xJrWxXwc_yoW3Grb_Ar 43KFy0gw4DA343Wr1qkFs8tayIvwsruw17X3y7ZwsFq3s8Xa9akFyDKr1DuFsFyF4UZF98 C3y8AFn3KFZagosvyTuYvTs0mTUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb7xYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV WxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j8yCJUUUUU= X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,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: 在 2023-09-06三的 18:56 +0800,Xi Ruoyao写道: > On Wed, 2023-09-06 at 18:45 +0800, Xiaolong Chen wrote: > > + *((int*)& __m128_op0[3]) = 0x004200a0; > > + *((int*)& __m128_op0[2]) = 0x00000000; > > + *((int*)& __m128_op0[1]) = 0x004200a0; > > + *((int*)& __m128_op0[0]) = 0x00200001; > > These are aliasing rule violation and they will suddenly blow up when > GCC optimizer starts to optimize more aggressively based on the > aliasing > rule. > > Try not to use these (you can write a helper function to memcpy() > into a > __m128). Or use -fno-strict-alising in dg-options. > Okay, thanks for the tip. After carefully reading the gcc manual, a new addition -fno-strict-aliasing in dg-options is added. Thanks.