From patchwork Fri Jun 12 20:43:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Wilson X-Patchwork-Id: 483761 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48582140290 for ; Sat, 13 Jun 2015 06:43:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=xaS2+Vhq; dkim-atps=neutral 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:content-type; q= dns; s=default; b=VISFeDt0niEY+zThPBdIWs4EFN3e+vbCe9dqNuPUwYUBNV V4zOh47TR7QVb4AYl4Y9zqK3DxBbcVsqX0wxgy3kQVWVwIJzeyueH9UkLn1JrKQ6 Yoh+tNkHaJb7krFvi1u7j1b3dTaejJfQmoxjaRf4A0OkqoI1ckxHH7UFCH/UI= 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:content-type; s= default; bh=qU6Tk+TOzkGg+U6ciNdYpd9U6qA=; b=xaS2+VhqvNjAEjduhyn+ rCKvTp3w0VmQxdiFHAs9feGoNHhPiBJBSZntT5KES/Xc2kmd1Yj5ZtUyUWdarLh5 66j80Va5nL1X98XZ0zMJ6rqQU7Ie+xDwZ+aV4KGJGkaj1UzGDN7sLj/cUVKa7BlK mzZSunuKNQdm2XL1aVRqDLE= Received: (qmail 111952 invoked by alias); 12 Jun 2015 20:43:44 -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 111943 invoked by uid 89); 12 Jun 2015 20:43:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f175.google.com Received: from mail-qk0-f175.google.com (HELO mail-qk0-f175.google.com) (209.85.220.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 12 Jun 2015 20:43:42 +0000 Received: by qkx62 with SMTP id 62so22303275qkx.3 for ; Fri, 12 Jun 2015 13:43:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=r1MBRv7MHk119T//xabF+C6cLm01gECpDFiU2DI82Fk=; b=f3Qe9ciNSsGQk9p+kxBlvxmmVMxVKJfuE0fN9sNaZ/FW5dy4Jp9xiJ/pZNqxTvSmuk 3E1OwBsBMJ68LLSScvX80oOnlxwPvqVMkgJbtobm4P5aSEW9i8I4/fF/PRUicmWtITNR OPcD6eyH6gJX8KRXOOSv2PgxtBMhh4XcDtdP9FxAQDraaROprFw7HtzXVwhVfQPRfvFh 8SqR3GVQW2LBoEsL5+F+CPSpDZXnKKyq8WYUkMMtJgSOEmb6B27xkaq7c9/53YC6cgXu 6/Qnj9P8YCygEi2e8FM6oo4wJVeVpCudJ4V3ziIcMQwOLgTZ5BpYsAhuUjMPqujYUrrK v+nw== X-Gm-Message-State: ALoCoQm8tbu1QHToaczKVrhqMNVI5GxPn8kUyVFe1VczP5BpubEKuFDgE07CZ/uRhpFoUgt2G0kC MIME-Version: 1.0 X-Received: by 10.55.22.4 with SMTP id g4mr34552984qkh.10.1434141820302; Fri, 12 Jun 2015 13:43:40 -0700 (PDT) Received: by 10.140.101.67 with HTTP; Fri, 12 Jun 2015 13:43:40 -0700 (PDT) Date: Fri, 12 Jun 2015 13:43:40 -0700 Message-ID: Subject: [PATCH, AARCH64] movi type attribute confusion From: Jim Wilson To: "gcc-patches@gcc.gnu.org" We have 5 patterns that can emit the movi instruction. These patterns map it to 4 different type attributes. The mov_aarch64 pattern uses mov_imm. The movdi_aarch64 pattern uses fmov. The movtf_aarch64 pattern uses fconstd. And the two aarch64_simd_mov patterns for VD and VQ use neon_move. Bitwise identical instructions should always map to the same attribute type, so we need to change these patterns to agree on the right attribute. movi is an integer simd instruction, so neon_move is the only choice that makes sense. The following patch corrects the first 3 patterns to use neon_move like the last two. We could optionally create a new type attribute, e.g. neon_move_imm. I can do that if people think it would be better. This patch was tested with a make bootstrap and make check on an APM box running Ubuntu 14.04. FYI This patch overlaps with my movtf-zero patch which is still waiting review, but the overlap is trivial to resolve so this should not be a problem. Jim 2015-06-12 Jim Wilson * config/aarch64/aarch64.md (mov_aarch64): Change alternative 2 to use neon_move instead of mov_imm. (movdi_aarch64): Change alternative 14 to use neon_move not fmov. (movtf_aarch64): Change alternative 4 to use neon_move_q not fconstd. Index: config/aarch64/aarch64.md =================================================================== --- config/aarch64/aarch64.md (revision 224441) +++ config/aarch64/aarch64.md (working copy) @@ -827,7 +827,7 @@ (define_insn "*mov_aarch64" gcc_unreachable (); } } - [(set_attr "type" "mov_reg,mov_imm,mov_imm,load1,load1,store1,store1,\ + [(set_attr "type" "mov_reg,mov_imm,neon_move,load1,load1,store1,store1,\ neon_to_gp,neon_from_gp,neon_dup") (set_attr "simd" "*,*,yes,*,*,*,*,yes,yes,yes")] ) @@ -912,7 +912,7 @@ (define_insn_and_split "*movdi_aarch64" DONE; }" [(set_attr "type" "mov_reg,mov_reg,mov_reg,mov_imm,mov_imm,load1,load1,store1,store1,\ - adr,adr,f_mcr,f_mrc,fmov,fmov") + adr,adr,f_mcr,f_mrc,fmov,neon_move") (set_attr "fp" "*,*,*,*,*,*,yes,*,yes,*,*,yes,yes,yes,*") (set_attr "simd" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,yes")] ) @@ -1063,7 +1063,7 @@ (define_insn "*movtf_aarch64" str\\t%q1, %0 ldp\\t%0, %H0, %1 stp\\t%1, %H1, %0" - [(set_attr "type" "logic_reg,multiple,f_mcr,f_mrc,fconstd,fconstd,\ + [(set_attr "type" "logic_reg,multiple,f_mcr,f_mrc,neon_move_q,fconstd,\ f_loadd,f_stored,neon_load1_2reg,neon_store1_2reg") (set_attr "length" "4,8,8,8,4,4,4,4,4,4") (set_attr "fp" "*,*,yes,yes,*,yes,yes,yes,*,*")