This is an archive of the discontinued LLVM Phabricator instance.

[VE] Add vector load/store instructions
ClosedPublic

Authored by kaz7 on Oct 10 2020, 1:08 AM.

Details

Summary

Add vector registers and vector load/store instructions. Add
regression tests for vector load/store instructions too.

Diff Detail

Event Timeline

kaz7 created this revision.Oct 10 2020, 1:08 AM
kaz7 requested review of this revision.Oct 10 2020, 1:08 AM
simoll added inline comments.Oct 12 2020, 2:48 AM
llvm/lib/Target/VE/VEISelLowering.cpp
637–672

I wonder why there are vector types that do not map directly to vector registers.

kaz7 added a comment.Oct 12 2020, 4:38 AM

Reply to an inline comment.

llvm/lib/Target/VE/VEISelLowering.cpp
637–672

Which types are not mapped as you are asked? I think all vector types from v2f64 to v256f64 are mapped.

simoll added inline comments.Oct 13 2020, 12:37 AM
llvm/lib/Target/VE/VEISelLowering.cpp
637–672

Yes, they are mapped now, but why are there more vector types being added than necessary? For example, v16f64 is not a vector register type for VE. If it was not mapped, LLVM could still legalize/expand it into a legal v256f64 type.
I was expecting to see only v256i64, v256f64, v512i32,v512f32,v256i1 and v512i1 in this list but there may be a good reason to have all other vector types here too.

kaz7 added inline comments.Oct 13 2020, 2:02 AM
llvm/lib/Target/VE/VEISelLowering.cpp
637–672

I've understood your point. The reason doing this is to support regular SIMD fixed-sized-vector optimization on VE in the future. I would like to support both existing SIMD optimization and vector predication optimization. This SIMD optimization for VE is partially implemented locally.

On the other hand, there was a discussion like that we should support not only V64 (16384) register but also V16384, V8192, V4096, ..., V64 registers. Nobody except me wants it, so not implemented yet, though.

simoll accepted this revision.Oct 14 2020, 12:20 PM

We can keep those register mappings for now and refine them later.

This revision is now accepted and ready to land.Oct 14 2020, 12:20 PM
This revision was landed with ongoing or failed builds.Oct 14 2020, 5:27 PM
This revision was automatically updated to reflect the committed changes.