This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use getSplatBuildVector instead of getSplatVector for fixed vectors.
ClosedPublic

Authored by craig.topper on Mar 21 2022, 2:16 PM.

Details

Summary

The splat_vector will be legalized to build_vector eventually
anyway. This patch makes it take fewer steps.

Unfortunately, this results in some codegen changes. It looks
like it comes down to how the nodes were ordered in the topological
sort for isel. Because the build_vector is created earlier we end up
with a different ordering of nodes.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 21 2022, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 2:16 PM
craig.topper requested review of this revision.Mar 21 2022, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 2:16 PM
frasercrmck accepted this revision.Mar 30 2022, 9:43 AM

Seems sensible to me, thanks.

llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll
570

Huh, this is the only line that differs between RV32 and RV64? Not sure we've seen something like that before, have we?

This revision is now accepted and ready to land.Mar 30 2022, 9:43 AM