From patchwork Wed Nov 22 10:34:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 168295 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1227201vqb; Wed, 22 Nov 2023 02:34:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFP+dZ3MLIdmH/2dWKoetQtwOptwlRWp6Tnapt8Db7vSyxYWBk9887fU6onPDVoInw3tCz X-Received: by 2002:a05:6214:2aa8:b0:66d:3f56:ec3f with SMTP id js8-20020a0562142aa800b0066d3f56ec3fmr2380911qvb.13.1700649287430; Wed, 22 Nov 2023 02:34:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700649287; cv=pass; d=google.com; s=arc-20160816; b=DE8px5ulqQkKVQq+wE/zaFRkcWrb7q78S8hem87eAyOm+aUxTC6S+aq9c1q/rRuWeD D0sVe+pAixFEs5lBuMIcamu3gAIRS5a4MTSC1ro7dfpS5ILcmdJSFgvtc9Zi8tQ0W6oq AgRVxtzEZeoIp51YWN9P/jZMvBt1vD/vOjBaEuVFzV/1VJ3HSWI1zvZt+5HNFv5J3ugW vyoiSfY+xfhSdH4S3IDiIUe+52HlCX8/E0M6paSM/Ox/UT9ibtfwbGRHkfURXZKbwlSu uMrc4NSSNjD3uZ7HPMQPs0iUbT5eVKW9Onjq3XZ60UMM6gu+xRuF1ZYAqphnOZcj68wE GHCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=acFpQ1G+WOIhId18p90ni/3LLlhyyHBzi28e9N/ST9s=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=qp9jxU3M60/ZPTOsItCein7KL0X596TUwFWlHFHA4Ci91oMK/M4IHpykwMnon/aaJl njI5DpYPYKYr9gGcdmVdtJl5Ld2rGvAoqyTSHpSV/cM0BJl+SHHUobVBlgKBMslnpBQg bDlfWxAr5zQVzRRYlm8HxxY2dzlLjKt7D1uCG7FxJ8+debYeDgjjXDlqyN3yLf9667DD p/6oGBidryea7xh3fJBLdyt73T4fzY4IwfxOJKcUjVUi0rWGrw8HVD7FXWavqE1f3tEI 1YRUzoU0VyqtUBQdZ0JITwDF2OvrBFpBXe4QpS/MGouGPoqJsKiZGqrXyl90MrUgtOoy tfWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Vbf5ybTS; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d8-20020a0cfe88000000b0066d0f75bd25si10820924qvs.614.2023.11.22.02.34.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 02:34:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Vbf5ybTS; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0BF4F38582A5 for ; Wed, 22 Nov 2023 10:34:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 714883858D35 for ; Wed, 22 Nov 2023 10:34:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 714883858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 714883858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700649264; cv=none; b=BE32mMlq2WwAADekeS4QqfewaH/XuM0h36zTvRK5f0zB43UeTS+b6zaNhj3jll3enC8QfrUwkWH9pxxdjd8FTT/MXcVIWJ0bExvLddXlTBAMcR3+57XP94TXz2cqP3IQuWN2jpfyn5InQ1vJrQQ/tjzTE3RGCVlDlFNIMo6+CMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700649264; c=relaxed/simple; bh=6hyBFrxUAkYSsI7fGE53rPO8k1wwfpmg3RgXS1hIKnA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Yuex99q6hc3PgL/0bMCQe6FOjWD4rNTpZ75PfYz+PqRXjrhRfxx2dS2YAnu8CK1X4YRKwIHetbv6QtbfbeZI5pxqky4h0x8Lm+V9asvRGkILm909wd4yAlYqm1o19Lky6yDV/UN6tTqq0sjjhX0osF0ked1dHHsaQhzmgctOZRo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700649263; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=acFpQ1G+WOIhId18p90ni/3LLlhyyHBzi28e9N/ST9s=; b=Vbf5ybTSXAuqiEg1IpS6LY76XVxcDWTcZYUF5CVFZagH1OiyhSMi+8o4jwSatFOX4QcXaa 75m8ziX/Xs8iyVyAamticodLlTxpI7G0GydZae4wZsz4FMJHQ+9PZyu/5HaFvSW9BiQLIU Xx/JDQD7g6SDfBUvU3UvcgxOzHYN0uo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-504-iWxOnKYJMeOpNHhhSN-IaQ-1; Wed, 22 Nov 2023 05:34:21 -0500 X-MC-Unique: iWxOnKYJMeOpNHhhSN-IaQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61D0B811E7D for ; Wed, 22 Nov 2023 10:34:21 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2265E492BE0 for ; Wed, 22 Nov 2023 10:34:21 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AMAYIjj2485564 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 22 Nov 2023 11:34:19 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AMAYIZw2485563 for gcc-patches@gcc.gnu.org; Wed, 22 Nov 2023 11:34:18 +0100 Date: Wed, 22 Nov 2023 11:34:18 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Add testcase for already fixed PR112518 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783260027423692214 X-GMAIL-MSGID: 1783260027423692214 Hi! This PR has been fixed by the PR112526 fix. Tested on x86_64-linux and i686-linux, committed to trunk as obvious. 2023-11-22 Jakub Jelinek PR target/65368 * gcc.target/i386/bmi2-pr112518.c: New test. Jakub --- gcc/testsuite/gcc.target/i386/bmi2-pr112518.c.jj 2023-11-21 19:55:21.948132480 +0100 +++ gcc/testsuite/gcc.target/i386/bmi2-pr112518.c 2023-11-21 19:57:13.694570877 +0100 @@ -0,0 +1,25 @@ +/* PR target/65368 */ +/* { dg-do run { target { bmi2 && int128 } } } */ +/* { dg-options "-Os -mbmi2" } */ + +#include "bmi2-check.h" + +unsigned u; +int g; + +unsigned long long +foo (int i) +{ + unsigned long long x = u; + g = __builtin_mul_overflow_p (u, ((unsigned __int128) 4292468825) << 64 | 150, 0); + x |= g % i; + return x; +} + +static __attribute__((noipa)) void +bmi2_test () +{ + unsigned long long x = foo (3); + if (x) + __builtin_abort (); +}