https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64882

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #7)
> But what about vsib_address_operand, address_mpx_no_base_operand,
> address_mpx_no_index_operand?

These *do* check modes, the problematic predicate is defined as a special
predicate (AKA "define_special_predicate")

> Even address_operand is used directly:
>   [(prefetch (match_operand:P 0 "address_operand" "p")
>              (const_int 1)
>              (const_int 2))]

Hm... don't know the reason, but effectively address_operand is a special
predicate, too.

> The comment above address_operand is definitely confusing, because when it
> is used directly in the *.md (various ports), then the mode of the address
> is passed to it, the comment above address_operand is confusing:
> "Return 1 if OP is a valid memory address for a memory reference of mode
> MODE."
> and memory_address_p it calls wants address of the MEM, not the address.

FYI, testcase tweaked to be 32-bit clean and still exhibit the issue with -m64:

With the patch from Comment #5? It works for me with patched gcc (BTW: I think
this testcase should be put into torture directory).

Reply via email to