From patchwork Wed Sep 12 15:07:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 969060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-485524-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="IlhyfVbl"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AjoUNa1q"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 429QBN3Zszz9s4V for ; Thu, 13 Sep 2018 01:07:40 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=lSN+HfzXP/QcAfnXhezTj5lzdw10E7CvoOkXgQvmS+yq5r yf17Nhc8yrOEVqvblsfV/0B9kr3hJRog4m5yPbQEOZ2ea0oJNUw0pICFhsQzF7Rf UdPvT+r8ZLedwbJJdwj0JVFPKN9Db0Nrkm4pveZJP0W0Zq3Tjj71LEIOZWvqo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=kTyZUhIlZ78fa5mOZTNqTbHExfU=; b=IlhyfVblTq923cDSDvDv mxis7aiKtuJ8VrblE/oJcppubJfHswCceI2Rf1ZlHwetW21mzhL2DtEzu/FBOT68 9MFrSJpszm1mG+lH23J6IuO/S3gX9qjriorwtrQGolIRUvI6nIi4ytjVDzJBv4sm jasZ1Lj43Xj9BQQOQqLJNwk= Received: (qmail 27449 invoked by alias); 12 Sep 2018 15:07:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 27271 invoked by uid 89); 12 Sep 2018 15:07:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=xm, xx X-HELO: mail-io1-f44.google.com Received: from mail-io1-f44.google.com (HELO mail-io1-f44.google.com) (209.85.166.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Sep 2018 15:07:26 +0000 Received: by mail-io1-f44.google.com with SMTP id q4-v6so443469iob.8 for ; Wed, 12 Sep 2018 08:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HwU7nZ6DbnUI/OaxGGIe1crL5yjp6q7fH647hE/nc6U=; b=AjoUNa1q4FqSRNVDLmhEdyJQkIJVdMKH0bAXA15oM8HsV2lnAfJLN/i0HIOsjq2icK Mw14LBAYxY/cP82a0LCb8kkZcBB0r8rgWV9sM9xU6kdFONmf/NhVgNY64US3PIdR2CFl uCH7C1Nj8K3ryHK7Bbq/2xt1ecbP2BRTUT/kVV4E5LTKM2O1hMHf29Iauq5yyWWq4Bnh vKy1qZrGkskCz6mXH7ZGIBP/wbq+sPpBOmKXPEIZGoVuhbRFxWyW46NyHu+MbBd1X8TW Ej3wsYUDtSaE43D4iodR/+sPxqf0as9wNXCu3i6guZlIf7KX4fyK89OHRiAKpPsCcjX8 ZlsA== MIME-Version: 1.0 Received: by 2002:a02:56d5:0:0:0:0:0 with HTTP; Wed, 12 Sep 2018 08:07:23 -0700 (PDT) From: Uros Bizjak Date: Wed, 12 Sep 2018 17:07:23 +0200 Message-ID: Subject: [PATCH, i386]: Remove sqrt_extendxf3_i387 insn pattern To: "gcc-patches@gcc.gnu.org" Hello! This pattern is not needed because all x87 float_extend RTXes degenerate to a plain move (or a no-op move). 2018-09-11 Uros Bizjak * config/i386/i386.md (sqrt_extendxf3_i387): Remove. (sqrt2): Extend operand 1 to XFmode and generate sqrtxf3 insn. Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros. Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 264242) +++ config/i386/i386.md (working copy) @@ -15126,19 +15126,6 @@ (set_attr "amdfam10_decode" "direct") (set_attr "bdver1_decode" "direct")]) -(define_insn "sqrt_extendxf2_i387" - [(set (match_operand:XF 0 "register_operand" "=f") - (sqrt:XF - (float_extend:XF - (match_operand:MODEF 1 "register_operand" "0"))))] - "TARGET_USE_FANCY_MATH_387" - "fsqrt" - [(set_attr "type" "fpspc") - (set_attr "mode" "XF") - (set_attr "athlon_decode" "direct") - (set_attr "amdfam10_decode" "direct") - (set_attr "bdver1_decode" "direct")]) - (define_insn "*rsqrtsf2_sse" [(set (match_operand:SF 0 "register_operand" "=x,x") (unspec:SF [(match_operand:SF 1 "nonimmediate_operand" "x,m")] @@ -15201,9 +15188,10 @@ if (!(SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH)) { rtx op0 = gen_reg_rtx (XFmode); - rtx op1 = force_reg (mode, operands[1]); + rtx op1 = gen_reg_rtx (XFmode); - emit_insn (gen_sqrt_extendxf2_i387 (op0, op1)); + emit_insn (gen_extendxf2 (op1, operands[1])); + emit_insn (gen_sqrtxf2 (op0, op1)); emit_insn (gen_truncxf2_i387_noop_unspec (operands[0], op0)); DONE; }