From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74663 invoked by alias); 3 Sep 2017 18:53:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 74654 invoked by uid 89); 3 Sep 2017 18:53:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=hello! X-HELO: mail-vk0-f42.google.com Received: from mail-vk0-f42.google.com (HELO mail-vk0-f42.google.com) (209.85.213.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 03 Sep 2017 18:53:11 +0000 Received: by mail-vk0-f42.google.com with SMTP id z187so10191858vkd.2 for ; Sun, 03 Sep 2017 11:53:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BogmLA0FbIp2Y7nmMlHIUuqknOpj9nwls1CKAfKWQUg=; b=jObs0VDkb8ug+zz1oiMmsYLabCB7Qc9fINAugZMfMX1T4kgAoF52A9/0Jv+GLjLfa/ xq+PXAjgfxuxFLP+3WXjyxiNO5MixnppSdywzWqUIZGRiN0jI4tnZHXhKFR91WnvAIqt w33u+ptmi13L01T5JsFVIsV1i5la+O98KVnSNrnJZMYyUxuu+kuMCQ9Nhuh1Yw8MnRGn qyLg/IniS7oP6jmfqGRVATACwVYD/QztBn6Fkav31t3TRoRcj2RKtsEFnvvhkSV0HuTk XRcBf1uvW67NsDVcu2AUpso/lqUylqjejr8BPsIT4mPmAoQij7At8OYIO1CfeLtzcXxv 0NJg== X-Gm-Message-State: AHPjjUhZGM8eU3CCw7sheE5RxoxXFj1XYnBVgxAyxvH1w56Rw6hSeOil wz+dyQRh9r7Pe18YXE7dE44rXyCA7oCv X-Google-Smtp-Source: ADKCNb7L4TjtCNi7EU0PlbBxwPM77xERBksk6WcLG21Ms2Gc0dNhYnBE6eW+BGJ9tc5ttr7lhQIPF5s09JfgYU01zLw= X-Received: by 10.31.33.141 with SMTP id h135mr5292224vkh.137.1504464789415; Sun, 03 Sep 2017 11:53:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.55.28 with HTTP; Sun, 3 Sep 2017 11:53:09 -0700 (PDT) From: Uros Bizjak Date: Sun, 03 Sep 2017 18:53:00 -0000 Message-ID: Subject: [PATCH, i386]: Allow memory operand for BT with immediate bitcount operand To: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-09/txt/msg00125.txt.bz2 Hello! The BT instruction is slow only when memory operand is used with nonimmediate bitcount operand. 2017-09-03 Uros Bizjak * config/i386/i386.md (*bt): Use nonimmediate_operand predicate for operand 1. Add (m,) constraint. (*jcc_bt): Use nonimmediate_operand predicate for operand 1. Prevent memory operand 1 with register operand 2. 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 251566) +++ config/i386/i386.md (working copy) @@ -11217,9 +11217,9 @@ [(set (reg:CCC FLAGS_REG) (compare:CCC (zero_extract:SWI48 - (match_operand:SWI48 0 "register_operand" "r") + (match_operand:SWI48 0 "nonimmediate_operand" "r,m") (const_int 1) - (match_operand:SI 1 "nonmemory_operand" "r")) + (match_operand:SI 1 "nonmemory_operand" "r,")) (const_int 0)))] "" { @@ -11248,7 +11248,7 @@ [(set (pc) (if_then_else (match_operator 0 "bt_comparison_operator" [(zero_extract:SWI48 - (match_operand:SWI48 1 "register_operand") + (match_operand:SWI48 1 "nonimmediate_operand") (const_int 1) (match_operand:SI 2 "nonmemory_operand")) (const_int 0)]) @@ -11260,7 +11260,7 @@ ? (INTVAL (operands[2]) < GET_MODE_BITSIZE (mode) && INTVAL (operands[2]) >= (optimize_function_for_size_p (cfun) ? 8 : 32)) - : register_operand (operands[2], SImode)) + : !memory_operand (operands[1], mode)) && can_create_pseudo_p ()" "#" "&& 1"