This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Add isF argument to SchedSEWSet
ClosedPublic

Authored by pcwang-thead on May 31 2023, 1:31 AM.

Details

Summary

So that we can remove SchedSEWSetF and simplify some code.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 1:31 AM
pcwang-thead requested review of this revision.May 31 2023, 1:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 1:31 AM
michaelmaitland accepted this revision.May 31 2023, 11:01 AM

LGTM with minor comment.

llvm/lib/Target/RISCV/RISCVScheduleV.td
24

Should we add an assert that LMUL should not be M8 for widening?

This revision is now accepted and ready to land.May 31 2023, 11:01 AM
llvm/lib/Target/RISCV/RISCVScheduleV.td
24

Should we add an assert that LMUL should not be M8 for widening?

24

The scalar operand of reductions can be M8, so I think we can't assert that.

pcwang-thead marked an inline comment as done.May 31 2023, 8:10 PM
llvm/lib/Target/RISCV/RISCVScheduleV.td
24

What does it mean for a scale operand to be M8? I’m not sure LMUL applies to scalar operands.

24

What does it mean for a scale operand to be M8? I’m not sure LMUL applies to scalar operands.

*Scalar

craig.topper added inline comments.May 31 2023, 8:43 PM
llvm/lib/Target/RISCV/RISCVScheduleV.td
24

The scalar operand is always LMUL=1. But the vector operand of a widening reduction can be LMUL=8 as long at the SEW is less than ELEN. Widening reductions produce a single element result with 2*SEW.

llvm/lib/Target/RISCV/RISCVScheduleV.td
24

Got it. This change looks good and I have no more questions about this assertion.

This revision was automatically updated to reflect the committed changes.