public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386] Fix `misaligned_operand' predicate.
@ 2015-06-24 14:44 Kirill Yukhin
  2015-06-24 15:18 ` Uros Bizjak
  0 siblings, 1 reply; 2+ messages in thread
From: Kirill Yukhin @ 2015-06-24 14:44 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: GCC Patches

Hello,

Patch in the bottom uses proper check of valid memory
in `misaligned_operand' predicate.

gcc/
        * config/i386/predicates.md (misaligned_operand): Properly
        check if operand is memory.

Bootstrapped and reg-tested.

Is it ok for trunk?

--
Thanks,  K

diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 4e45246..7d6ae77 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -1365,7 +1365,7 @@

 ;; Return true if OP is misaligned memory operand
 (define_predicate "misaligned_operand"
-  (and (match_code "mem")
+  (and (match_operand 0 "memory_operand")
        (match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)")))

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, i386] Fix `misaligned_operand' predicate.
  2015-06-24 14:44 [PATCH, i386] Fix `misaligned_operand' predicate Kirill Yukhin
@ 2015-06-24 15:18 ` Uros Bizjak
  0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2015-06-24 15:18 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: GCC Patches

On Wed, Jun 24, 2015 at 4:35 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
>
> Patch in the bottom uses proper check of valid memory
> in `misaligned_operand' predicate.
>
> gcc/
>         * config/i386/predicates.md (misaligned_operand): Properly
>         check if operand is memory.
>
> Bootstrapped and reg-tested.
>
> Is it ok for trunk?

I have reviewed the uses of misaligned_operand predicate, and AFAICS
they always operate after the check for "memory_operand". So, there is
no point to re-check it with full memory_operand predicate.

Please introduce another predicate for legitimate misaligned memory
operand, perhaps named "misaligned_memory_operand".

Uros.

> --
> Thanks,  K
>
> diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
> index 4e45246..7d6ae77 100644
> --- a/gcc/config/i386/predicates.md
> +++ b/gcc/config/i386/predicates.md
> @@ -1365,7 +1365,7 @@
>
>  ;; Return true if OP is misaligned memory operand
>  (define_predicate "misaligned_operand"
> -  (and (match_code "mem")
> +  (and (match_operand 0 "memory_operand")
>         (match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)")))
>
>  ;; Return true if OP is a emms operation, known to be a PARALLEL.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-24 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 14:44 [PATCH, i386] Fix `misaligned_operand' predicate Kirill Yukhin
2015-06-24 15:18 ` 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).