This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][InsertVSETVLI] Rewrite scalar insert forward rule in terms of demanded fields
ClosedPublic

Authored by reames on Dec 15 2022, 11:55 AM.

Details

Summary

This is mostly geared at consolidating logic into one form to reduce code duplication, but also has the effect of being a slight generalization. Since these operations aren't masked, we can ignore the mask policy bit when deciding on compatibility. The previous code was overly strict in checking that both policy bits matched.

Diff Detail

Event Timeline

reames created this revision.Dec 15 2022, 11:55 AM
reames requested review of this revision.Dec 15 2022, 11:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 11:55 AM
craig.topper accepted this revision.Dec 20 2022, 10:41 PM

LGTM

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
263–264

while you're here

"is only" -> "are only"

This revision is now accepted and ready to land.Dec 20 2022, 10:41 PM
asb accepted this revision.Dec 21 2022, 1:41 AM
This revision was landed with ongoing or failed builds.Jan 3 2023, 2:21 PM
This revision was automatically updated to reflect the committed changes.
reames added inline comments.Jan 3 2023, 2:24 PM
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
263–264

Typo fix done separately in 6df5464a4 to get both copies.