This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Pre-process integer ISD::SPLAT_VECTOR to RISCISD::VMV_V_X_VL before isel.
ClosedPublic

Authored by craig.topper on Feb 7 2022, 3:37 PM.

Details

Summary

This allows us to remove some isel patterns that exist for both
operations. Saving nearly 3000 bytes from the isel table.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 7 2022, 3:37 PM
craig.topper requested review of this revision.Feb 7 2022, 3:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2022, 3:37 PM
kito-cheng added inline comments.Feb 7 2022, 6:58 PM
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
50

Should be VMV_V_X_VL? the title seems typo too?

craig.topper retitled this revision from [RISCV] Pre-process integer ISD::SPLAT_VECTOR to RISCISD::VFMV_V_F_VL before isel. to [RISCV] Pre-process integer ISD::SPLAT_VECTOR to RISCISD::VMV_V_X_VL before isel..Feb 7 2022, 7:06 PM

Fix comment mistake. I originally tried to do integer and FP and deleted the wrong part of the comment when I switched to just integer.

I think this is a sensible approach, I was going to do the same for floating-point splats anyway in/after D117670.

clang-format

Agree, it's a sensible approach. LGTM.

This revision is now accepted and ready to land.Feb 9 2022, 4:15 AM