This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add the policy operand for some masked RVV ternary IR intrinsics.
ClosedPublic

Authored by khchen on Jan 19 2022, 7:47 AM.

Details

Summary

Masked reduction intrinsics are specical cases which don't need to have policy
operand. The mask only affects which elements are read. It doesn't effect the
destination register.
The reduction intrinsics have a dedicated destination operand. If it
is undef, we use tail agnostic. If it not undef we use tail
undisturbed.

Co-Authored-by: Craig Topper <craig.topper@sifive.com>

Diff Detail

Event Timeline

khchen created this revision.Jan 19 2022, 7:47 AM
khchen requested review of this revision.Jan 19 2022, 7:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 19 2022, 7:47 AM
craig.topper added inline comments.Jan 19 2022, 3:34 PM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
2337

Ident the other arguments to line up with the first argument

khchen updated this revision to Diff 401447.Jan 19 2022, 4:49 PM

Address Craig's comment. Thanks.

craig.topper added inline comments.Jan 25 2022, 8:46 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
2494

This change doesn't look right. Or it's unrelated.

khchen updated this revision to Diff 403117.Jan 25 2022, 7:44 PM

rebase and address Craig's comment.

Gentle ping.

LGTM

Note, I don't think vslidedown needs a tail policy, but vslideup does. But probably not worth making them different.

craig.topper accepted this revision.Feb 10 2022, 11:32 PM
This revision is now accepted and ready to land.Feb 10 2022, 11:32 PM
This revision was landed with ongoing or failed builds.Feb 11 2022, 5:07 AM
This revision was automatically updated to reflect the committed changes.