On Sun, Dec 19, 2021 at 12:06:30PM -0800, H.J. Lu via Gcc-patches wrote:
> --- a/gcc/config/i386/predicates.md
> +++ b/gcc/config/i386/predicates.md
> @@ -1199,6 +1199,12 @@
>    (and (match_operand 0 "memory_operand")
>         (not (match_test "x86_extended_reg_mentioned_p (op)"))))
>  
> +;; Return true if OP is a memory operand representable on ix86.
> +(define_predicate "ix86_memory_operand"
> +  (and (match_operand 0 "memory_operand")
> +       (ior (match_test "mode == QImode || mode == HImode")
> +         (match_operand 0 "x86_64_general_operand"))))

I must be missing something, but how can this work?
x86_64_general_operand is:
(define_predicate "x86_64_general_operand"
  (if_then_else (match_test "TARGET_64BIT")
    (ior (match_operand 0 "nonimmediate_operand")
         (match_operand 0 "x86_64_immediate_operand"))
    (match_operand 0 "general_operand")))
and so for non-immediates like MEMs it is just a normal memory_operand.

        Jakub

Reply via email to