From patchwork Wed Apr 10 08:02:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenqiang Chen X-Patchwork-Id: 235326 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 072D52C009D for ; Wed, 10 Apr 2013 18:02:29 +1000 (EST) 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:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=v0E1bayt6JNsTU3SrrLSqFwXG4HEfPRxgkxBxXl7GPo KEMKyaXergavxx4pjJXD3t4Y4z3Zdf5fkC9i+7EzOYQTk5pusFCHMoD1B9CRNlpg qPJi/7d9idjRVZOhXsxoOpsOzG/EL3PoQ4pyBaznv62st51t7DxMjQjT8rQkaiXo = 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:date:message-id:subject:from:to:cc:content-type; s=default; bh=HqmA7uwdwGNhawI2hQTH7aJOZgQ=; b=W0Mw8UrBXX8KNIHWr vt01pkPSfVF+1Cm4Kdb0c3W64RwKm4XuNY9LSp93nvjtk4drUbhKBUxvlJnbFLU7 jEKtJuivxT8eu9F92tA0r7BbmzQZ3TtAFY9ypXKElzfYiuMPKpt0KjtpkOkz1HUD uAdxpjtWgySTIrEAJF4mVM+yU0= Received: (qmail 18616 invoked by alias); 10 Apr 2013 08:02:22 -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 18605 invoked by uid 89); 10 Apr 2013 08:02:22 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 Received: from mail-ia0-f174.google.com (HELO mail-ia0-f174.google.com) (209.85.210.174) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 10 Apr 2013 08:02:21 +0000 Received: by mail-ia0-f174.google.com with SMTP id r13so169940iar.33 for ; Wed, 10 Apr 2013 01:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type:x-gm-message-state; bh=c7h63qXfO6ilP2YiFknPYXo/S/CYEzEpL1ffTjWehcg=; b=ZKcf/ZeNxZIrndTPzbHgOGDHm3BVW8LMlW3kLuamHdGYa5zHAUaINP90Qmzk4vwTdm +bCl6fRKfquX4ILgCFcEtFS2oKZg5R2QDcLoOq/UXlFg+H7gaNl8jVPIKxT9GTOzypBK MPHwKVAwsbPYoW9D5gosUf7MPX1eQW0kkDRyeMkNF78WQqC5P7DnWUKEP1XHhEIjMH3J d80JEfj12VW+ZY4xPGX6mRVKVPtMuFNW4eQQylg7YqSmsndysuIwKz7R4UkkMxxjRU8j 9ZcGHZ/ZIWuIb/+gJixaFdp0lGG2iazuD5LksfsY9G1F5LPDB0qZ8os+VauNTfbuVTgv WedQ== MIME-Version: 1.0 X-Received: by 10.50.6.34 with SMTP id x2mr713344igx.86.1365580940237; Wed, 10 Apr 2013 01:02:20 -0700 (PDT) Received: by 10.42.247.72 with HTTP; Wed, 10 Apr 2013 01:02:20 -0700 (PDT) Date: Wed, 10 Apr 2013 16:02:20 +0800 Message-ID: Subject: [PATCH, AARCH64] Fix unrecognizable insn issue From: Zhenqiang Chen To: gcc-patches@gcc.gnu.org Cc: marcus.shawcroft@arm.com X-Gm-Message-State: ALoCoQlXKgMMYbVVDK/Ud8Os/is751lpKJpcU2kYw67Qe8zhfZ6PQhOToV22vnsy5S3U1rdYhj0k Hi, During expand, function aarch64_vcond_internal inverses some CMP, e.g. a LE b -> b GE a But if "b" is "CONST0_RTX", "b GE a" will be an illegal insn. Refer https://bugs.launchpad.net/linaro-toolchain-binaries/+bug/1163942 for detail about the issue. The patch is to make "b" a register when inversing LE. Is it OK for trunk, 4.8 and arm/aarch64-4.7-branch? Thanks! -Zhenqiang ChangeLog: 2013-04-10 Zhenqiang Chen * config/aarch64/aarch64-simd.md (aarch64_vcond_internal): Set operands[5] to register when inversing LE. diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 92dcfc0..d08d23a 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -1657,6 +1657,8 @@ complimentary_comparison = gen_aarch64_cmgt; break; case LE: + if (!REG_P (operands[5])) + operands[5] = force_reg (mode, operands[5]); case UNLE: inverse = 1; /* Fall through. */