On 2/7/25 6:34 PM, Andrew Waterman wrote:
Replacing x0 with 0 when possible is fine; it should never hurt and
might help on some uarches.  (Of course, future versions of those
uarches will eventually be forced to improve handling of x0, anyway,
since as Vineet notes, some of the interesting cases don't have
immediate forms.)
Agreed.


But I don't think offering the -mvec-elide-x0 option is beneficial.
I'd just enable this change unconditionally.  Or, in the unlikely
event there's a uarch that benefits from the old code generation, this
would be better handled as a consequence of -mtune than as a new
top-level option.
I don't see much value in having this be selectable until we see a uarch where it matters. I'd just use the immediate forms when we have them.


Jeff

Reply via email to