This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Implement SPLAT_VECTOR for i1 vectors.
ClosedPublic

Authored by efriedma on Dec 6 2019, 6:18 PM.

Details

Summary

The generated sequence with whilelo is unintuitive, but it's the best I could come up with given the limited number of SVE instructions that interact with scalar registers. The other sequence I was considering was something like dup+cmpne, but an extra scalar instruction seems better than an extra vector instruction.

Diff Detail

Event Timeline

efriedma created this revision.Dec 6 2019, 6:18 PM
Herald added a project: Restricted Project. · View Herald Transcript
sdesmalen accepted this revision.Dec 9 2019, 1:19 AM

LGTM, thanks @efriedma!

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
7132

nit: Is it worth adding a check here that the type is legal?

This revision is now accepted and ready to land.Dec 9 2019, 1:19 AM
efriedma marked 2 inline comments as done.Dec 9 2019, 12:25 PM
efriedma added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
7132

Given the current set of setOperationAction calls, the return type should always be legal. Asserting that doesn't seem helpful.

The current lowering works whether or not the operand is legal. I guess ideally, we don't want to lower operations during type legalization, though.

efriedma marked an inline comment as done.Dec 9 2019, 3:00 PM
This revision was automatically updated to reflect the committed changes.