This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][CodeGen] Support Zhinx and Zhinxmin
ClosedPublic

Authored by realqhc on May 3 2023, 8:04 PM.

Diff Detail

Event Timeline

realqhc created this revision.May 3 2023, 8:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2023, 8:04 PM
realqhc requested review of this revision.May 3 2023, 8:04 PM
realqhc updated this revision to Diff 519344.EditedMay 3 2023, 8:06 PM

rebase

Do we need to update RISCVInstrInfo::storeRegToStackSlot and RISCVInstrInfo::loadRegFromStackSlot`?

Do we need to update RISCVInstrInfo::storeRegToStackSlot and RISCVInstrInfo::loadRegFromStackSlot`?

Based on my understanding, it may not require update, as the GPRRegClass load and store is handling it similar to the zfinx patch.

realqhc updated this revision to Diff 520542.May 8 2023, 6:02 PM

add missing changes in RISCVInstrInfo.cpp regarding FSGNJ_H_INX

Do we need to update RISCVInstrInfo::storeRegToStackSlot and RISCVInstrInfo::loadRegFromStackSlot`?

Based on my understanding, it may not require update, as the GPRRegClass load and store is handling it similar to the zfinx patch.

I hadn't noticed we are using the same spill sizes for GPRF16/GPRF32/GPRF64. So you're correct it doesn't need an update.

craig.topper added inline comments.May 8 2023, 6:06 PM
llvm/test/CodeGen/RISCV/half-select-fcmp.ll
17

Why are these lines deleted?

This comment was removed by realqhc.
realqhc updated this revision to Diff 520547.May 8 2023, 6:25 PM

restore the unintentionally removed test cases, it was caused by wrongly defined check prefix in zhinxmin

realqhc marked an inline comment as done.May 8 2023, 6:26 PM
realqhc added inline comments.
llvm/test/CodeGen/RISCV/half-select-fcmp.ll
17

updated the patch to fix it

realqhc marked an inline comment as done.May 8 2023, 6:28 PM

Can we make this patch not depend on Zdinx RV32 support? That patch needs more work and I don't want it to block Zhinx.

Can we make this patch not depend on Zdinx RV32 support? That patch needs more work and I don't want it to block Zhinx.

I have removed the dependency on phabricator, but I think some modification should be required on RISCVInstrInfoZfh.td, do you think it is better to move them to the rv32zdinx patch instead?

Can we make this patch not depend on Zdinx RV32 support? That patch needs more work and I don't want it to block Zhinx.

I have removed the dependency on phabricator, but I think some modification should be required on RISCVInstrInfoZfh.td, do you think it is better to move them to the rv32zdinx patch instead?

In the interest of forward progress, yes.

realqhc updated this revision to Diff 520899.May 9 2023, 8:50 PM

run clang-format

realqhc updated this revision to Diff 520901.May 9 2023, 9:09 PM

remove the dependency on rv32zdinx patch

This revision is now accepted and ready to land.May 11 2023, 11:34 AM
llvm/test/CodeGen/RISCV/half-round-conv-sat.ll