This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Prefer vnsrl.wi v8, v8, 0 over vnsrl.wx v8, v8, x0.
ClosedPublic

Authored by craig.topper on Aug 17 2022, 10:27 AM.

Details

Summary

I have a couple data points that some microarchitectures prefer
the immediate 0 over x0. Does anyone know of microarchitectures
where the opposite is true?

Unfortunately, this is different than the vncvt.x.x.w alias
from the spec. Perhaps the alias was poorly chosen if x0 isn't
as optimal as immediate 0 on all microarchitectures.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 17 2022, 10:27 AM
Herald added a project: Restricted Project. · View Herald Transcript
craig.topper requested review of this revision.Aug 17 2022, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2022, 10:27 AM
reames accepted this revision.Aug 19 2022, 7:24 AM

LGTM

This revision is now accepted and ready to land.Aug 19 2022, 7:24 AM
This revision was landed with ongoing or failed builds.Aug 19 2022, 8:40 AM
This revision was automatically updated to reflect the committed changes.