From patchwork Wed Oct 3 18:33:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 978481 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-486898-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="tJssbR4w"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dinH3eUI"; 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 42QPmh2n7Rz9s7T for ; Thu, 4 Oct 2018 04:33:54 +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=IrQ9iEiLXzgnlrCg3oZbIlLFW0YbpcCQp3CsC/+C9Lh0iQ R+HX2QzuYEPrJrAz5JHhEw5x8SJfoNdwlhBCvs7OxOTKxYvy0I0Qt9eBQFGEFKCo vq5d1lAg5oJS69j85izKIpKmy53W5Q/PTHZWWCMFVJgaX/kb0WwQ2UDQULhAw= 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=Iw9I8GDgxy1tmmsPtnuImCDnGc4=; b=tJssbR4wsI/mVX2+JPBG dD4rhBL5T7pz5kLGXBOKf42jNnrmioQ7VHeG8tNRDHGGPb/aiMj9bYanCNhULx+Z hnHvqfbD7VBWC62lWYqcK1qaUGQrMn9pzjyrMsscWUEeWhUtbM3TW4p7FZGkylv4 MiJbc0aOQYwRloiccigA7xk= Received: (qmail 14174 invoked by alias); 3 Oct 2018 18:33:48 -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 14161 invoked by uid 89); 3 Oct 2018 18:33:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=hello!, HX-Gm-Message-State:ABuFfoh, widening X-HELO: mail-it1-f170.google.com Received: from mail-it1-f170.google.com (HELO mail-it1-f170.google.com) (209.85.166.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Oct 2018 18:33:45 +0000 Received: by mail-it1-f170.google.com with SMTP id p64-v6so10397438itp.0 for ; Wed, 03 Oct 2018 11:33:45 -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=P5pYy4c9fiO9agHvL69P0hzIkSN+nSWdVd61GvhYaQ4=; b=dinH3eUIjkVVCa7E8fCddDMQJeFCbEAzeN86VvQLmTyAYZ93gfukP/MsidV8BSUtHM Y0u/LpAZLxfFpN2oqADbEO49FcZeLpPICedQLdMitxvhLWLnvBaWsnVYcBae0yKQys6v Q8J/B05/QADcbcxybxtvQNTmWtduSOStwjzB3qze74U3kBzGB/PaRcMv0hDMAIkMmITK TqqiyT2eMpZfQA5AaBVZ1IOJMfmKN+vI0P4w6V2pFj/J8xXjVsp+cO92n5cD8jT+Dm9D T0v9RVDJjLEjaUCmbOBUGgoNhuaRlyySG0INSm4EMUezLHZK/11HNzJ9vKym94o4F9JE MOwQ== MIME-Version: 1.0 From: Uros Bizjak Date: Wed, 3 Oct 2018 20:33:32 +0200 Message-ID: Subject: [PATCH, i386]: Remove mixed-mode x87 absneg patterns To: "gcc-patches@gcc.gnu.org" Hello! These are not needed, an explicit no-op float-extend will be emitted. The extension degrades to an ordinary move or a no-op in regstack pass, resulting in exactly the same assembly. 2018-10-03 Uros Bizjak * config/i386/i386.md (*extendsfdf2): Remove. (*extendxf2): Ditto. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 367e9bfe255b..7a85b464f7aa 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -920,7 +920,7 @@ (define_code_iterator absneg [abs neg]) ;; Base name for x87 insn mnemonic. -(define_code_attr absneg_mnemonic [(abs "abs") (neg "chs")]) +(define_code_attr absneg_mnemonic [(abs "fabs") (neg "fchs")]) ;; Used in signed and unsigned widening multiplications. (define_code_iterator any_extend [sign_extend zero_extend]) @@ -9796,28 +9796,10 @@ "TARGET_80387 && (reload_completed || !(SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH))" - "f" + "" [(set_attr "type" "fsgn") (set_attr "mode" "")]) -(define_insn "*extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (absneg:DF (float_extend:DF - (match_operand:SF 1 "register_operand" "0"))))] - "TARGET_80387 && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)" - "f" - [(set_attr "type" "fsgn") - (set_attr "mode" "DF")]) - -(define_insn "*extendxf2" - [(set (match_operand:XF 0 "register_operand" "=f") - (absneg:XF (float_extend:XF - (match_operand:MODEF 1 "register_operand" "0"))))] - "TARGET_80387" - "f" - [(set_attr "type" "fsgn") - (set_attr "mode" "XF")]) - ;; Copysign instructions (define_mode_iterator CSGNMODE [SF DF TF])