This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use vmv.v.x if Hi bits are undef when lowering splat_vector_parts
ClosedPublic

Authored by luke on Aug 23 2023, 8:22 AM.

Details

Summary

When lowering a splat_vector_parts, if the hi bits are undefined then we can
splat the lo bits without having to check if it's going to be sign extended or
not, because those bits will be undefined anyway.

I've handled it for both fixed and scalable vectors, but there's no diff
on the scalable vror tests, since the hi bits aren't combined away to
undef in SimplifyDemanded for scalable vectors. I'm not sure why that is.

Diff Detail

Event Timeline

luke created this revision.Aug 23 2023, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 8:22 AM
luke requested review of this revision.Aug 23 2023, 8:22 AM
craig.topper accepted this revision.Aug 23 2023, 9:55 AM
This revision is now accepted and ready to land.Aug 23 2023, 9:55 AM