public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Check natural alignment of the operand in misaligned_operand predicate
@ 2015-11-13  7:36 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2015-11-13  7:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: H.J. Lu

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-13  7:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13  7:36 [PATCH, i386]: Check natural alignment of the operand in misaligned_operand predicate Uros Bizjak

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).