public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>
Subject: [PATCH, i386]: Check natural alignment of the operand in misaligned_operand predicate
Date: Fri, 13 Nov 2015 07:36:00 -0000	[thread overview]
Message-ID: <CAFULd4Zs_ghJKSXhTchdeFAFQoEv0N_L9GwyjbAYpf0=-pK80w@mail.gmail.com> (raw)

Hello!

We have to check natural alignment of the operand in
misaligned_operand predicate. This predicate is used to check SSE
memory operands for alignment, when movaps instead of movups can be
used. This change makes predicate independent of BIGGEST_ALIGNMENT
setting.

2015-11-13  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/predicates.md (misaligned_operand): Return true if
    operand is aligned to less than its natural alignmnet.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32},
committed to mainline SVN.

Uros.

Index: config/i386/predicates.md
===================================================================
--- config/i386/predicates.md   (revision 230213)
+++ config/i386/predicates.md   (working copy)
@@ -1364,10 +1364,11 @@
 (define_predicate "absneg_operator"
   (match_code "abs,neg"))

-;; Return true if OP is misaligned memory operand
+;; Return true if OP is a memory operand, aligned to
+;; less than its natural alignment.
 (define_predicate "misaligned_operand"
   (and (match_code "mem")
-       (match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)")))
+       (match_test "MEM_ALIGN (op) < GET_MODE_BITSIZE (mode)")))

 ;; Return true if OP is a emms operation, known to be a PARALLEL.

                 reply	other threads:[~2015-11-13  7:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFULd4Zs_ghJKSXhTchdeFAFQoEv0N_L9GwyjbAYpf0=-pK80w@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).