From patchwork Wed Jul 10 21:03:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 1959015 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=erjOPRuK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WK9Mv3BzQz1xpd for ; Thu, 11 Jul 2024 07:04:26 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8625638708A5 for ; Wed, 10 Jul 2024 21:04:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id 16974386103F for ; Wed, 10 Jul 2024 21:04:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16974386103F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 16974386103F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720645446; cv=none; b=Ry8iTqXGZZyL1q3ActwllQUfAMyXJExmd6tjv9zjyDMYc8RZeGYxtUNrylpq+ExNUXXmWIi44IwiYCUE64JV8Xg82ea9wYNTeOZYjO1r8I0WZAh5becTdFmzLEdZqUmhyyNhvwu8S0fSMrOVFTZfYVifQD9hfmG7xaXdTiBf/FM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720645446; c=relaxed/simple; bh=m24yMerTGRUs28uYS0pllhGLq2hSyp4fLfOxnknhszs=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=wqepISAlEcZ0wGD+kUxSR0hVIOIGN4ynVHo2Vkcpzr+VNgl5nSsBSJUqHBJgbrPQxMH8RAQ3hIDTE/FxqHE+laZ9xOBzNBJPMOj9XRSuvg6RXd8HKQ3GzHT81k+rLzH351TkY1Du6SKLYqurzct/n8rGCMoKL4Hecw0n1kvJZJc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2ee9b098bd5so2957981fa.0 for ; Wed, 10 Jul 2024 14:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720645441; x=1721250241; darn=gcc.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=K+6EM3lU/KR46Xq2WXcriLnfixjIAcGnb4e1v+xZem4=; b=erjOPRuK2KLay8fOhoH5E9h1lECLqkIM91y9tB5KlBvlGM6Szki9kd6upBPe/YrWRs pZMq2HBClMosPlbXUiWO42Rm+YqrAqZ6pX4cZY4yzMG4001YwqYspfVqeHCBdWsNPLqk sUeQxQPg+zTmfm3X29HDndn9kw8d78VasEE9qn1xHveo1c2veow1Gg3oqeofFDPiIHKG AuahXZ74x6oWUbKjO+LvmUDt+RB05N56iY02erE2Xfx5J9Q0DkE57ksP9Jb6nDv0xJeT H8qOAFMFuVs+W0Ht76U5NKFdfEhh7uyyvWxs2RynGqdElSz7eABlpqa8jjUdgrTElVcN ANpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720645441; x=1721250241; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K+6EM3lU/KR46Xq2WXcriLnfixjIAcGnb4e1v+xZem4=; b=a3dNPghTJqlpAmdv56BCQP8fF0rompB+jEJA9M7sSlHMlYrce/sJfoCep3Uhg4b0pm mALf53KNAH60aYXPWsunukMu4uC5BsN33CAp+Wvh1JHvYrac1HAWXBb5FuG25zNP949O jL7s0vUpW1sfQDbGobgLOUnLQ5ctpBoU8fNmjdrBDeET3oGkZleV4ExXralnjiP13xcF 6i2wnNi3h0zaNWRqwv3wuLj/k8QJro+BP0tZnOVyoiJ8jWr4SHnmCettpNScK9jGRcln CDB4MrBBxHHY2sWMuEIfr1SuZA0JlSX4LDasgWIIrozQa9uD9prpep31p+7eTFg8WGp/ kidg== X-Gm-Message-State: AOJu0YzMWy4iMP5KAGQ8jgkmzkeF9dd+EJrWApiQYGhPMfK4+3hXyxyj pA3oBLVlgb1RpXRQrqOUnLTLFqlxoEJFGTpakguMtn3iwIx9uGL1tAXoYOsINi98mnouI7gKCDc Qgq05a+9Q3mSiiw+oKQyZYFOQgkqVlqlZZaA= X-Google-Smtp-Source: AGHT+IH3pP1KYRxVmgOGpNfMV5gZATNfMHra2ZZWP87iwhky+qUeFYH/UIZQXF1gYh1SvzpOUSgHrhhkoCDJ8TeRZ8g= X-Received: by 2002:a05:651c:1026:b0:2ee:64cf:f8f3 with SMTP id 38308e7fff4ca-2eeb3181c6fmr48393191fa.33.1720645440714; Wed, 10 Jul 2024 14:04:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Uros Bizjak Date: Wed, 10 Jul 2024 23:03:48 +0200 Message-ID: Subject: [committed] i386: Swap compare operands in ustrunc patterns To: "gcc-patches@gcc.gnu.org" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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 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: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org A last minute change led to a wrong operand order in the compare insn. gcc/ChangeLog: * config/i386/i386.md (ustruncdi2): Swap compare operands. (ustruncsi2): Ditto. (ustrunchiqi2): Ditto. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Uros. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e2f30695d70..de9f4ba0496 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -9990,7 +9990,7 @@ (define_expand "ustruncdi2" rtx sat = force_reg (DImode, GEN_INT (GET_MODE_MASK (mode))); rtx dst; - emit_insn (gen_cmpdi_1 (op1, sat)); + emit_insn (gen_cmpdi_1 (sat, op1)); if (TARGET_CMOVE) { @@ -10026,7 +10026,7 @@ (define_expand "ustruncsi2" rtx sat = force_reg (SImode, GEN_INT (GET_MODE_MASK (mode))); rtx dst; - emit_insn (gen_cmpsi_1 (op1, sat)); + emit_insn (gen_cmpsi_1 (sat, op1)); if (TARGET_CMOVE) { @@ -10062,7 +10062,7 @@ (define_expand "ustrunchiqi2" rtx sat = force_reg (HImode, GEN_INT (GET_MODE_MASK (QImode))); rtx dst; - emit_insn (gen_cmphi_1 (op1, sat)); + emit_insn (gen_cmphi_1 (sat, op1)); if (TARGET_CMOVE) {