i386: Improve index_register_operand predicate
commit508f082829af680ec4c1a5bcf55fe464986e3c95
authorUros Bizjak <ubizjak@gmail.com>
Thu, 4 May 2023 10:59:24 +0000 (4 12:59 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Thu, 4 May 2023 11:00:24 +0000 (4 13:00 +0200)
treec6a0417494940505e9f31a86c8d3ff15f96fa8b8
parent82cfd93ae81a5687bf2a1b12d964c630e95517a7
i386: Improve index_register_operand predicate

Use the same approach as in register_no_elim_operand predicate, but also
reject stack_pointer_rtx operands.

gcc/ChangeLog:

* config/i386/predicates.md (index_register_operand): Reject
arg_pointer_rtx, frame_pointer_rtx, stack_pointer_rtx and
VIRTUAL_REGISTER_P operands.  Allow subregs of memory before reload.
(call_register_no_elim_operand): Rewrite as ...
(call_register_operand): ... this.
(call_insn_operand): Use call_register_operand predicate.
gcc/config/i386/predicates.md