Page MenuHomePhabricator

[RISCV] Change zext.w to be an alias of add.uw rd, rs1, x0 instead of pack.
ClosedPublic

Authored by craig.topper on Jan 14 2021, 6:05 PM.

Details

Summary

This didn't make it into the published 0.93 spec, but it was the
intention.

But it is in the tex source as of this commit
https://github.com/riscv/riscv-bitmanip/commit/d172f029c074d47026a0c0d0f12d8b475c86a472

This means zext.w now requires Zba. Not sure if we should still use
pack if Zbp is enabled and Zba isn't. I'll leave that for the future
when pack is closer to being final.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 14 2021, 6:05 PM
craig.topper requested review of this revision.Jan 14 2021, 6:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2021, 6:05 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
craig.topper retitled this revision from [RISCV] Change zext.w to be an alias of add.uw rd, rs1, x0 instead of packw. to [RISCV] Change zext.w to be an alias of add.uw rd, rs1, x0 instead of pack..Jan 14 2021, 8:14 PM
craig.topper edited the summary of this revision. (Show Details)
frasercrmck accepted this revision.Jan 21 2021, 4:08 AM

LGTM, but should we document these "extra" things we're doing on top of the published spec? I'm not sure where, but it might help someone reading the spec as written.

This revision is now accepted and ready to land.Jan 21 2021, 4:08 AM
asb accepted this revision.Jan 22 2021, 9:22 AM

LGTM, added two minor notes.

llvm/lib/Target/RISCV/RISCV.td
73

I think this is unused?

llvm/lib/Target/RISCV/RISCVInstrInfoB.td
513

Per Fraser's comment about noting these deviations, it might be worth adding a code comment here to note the deviation from the 0.93 spec.

Add note about 0.93 diverging from the spec.
Remove unused subtarget feature

This revision was landed with ongoing or failed builds.Jan 22 2021, 12:51 PM
This revision was automatically updated to reflect the committed changes.