This patch introduces two new experimental IR intrinsics and SDAG nodes to represent vector strided loads and stores.
|50 ms||x64 debian > LLVM.Bindings/Go::go.test|
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/llvm-go go=/usr/bin/go test llvm.org/llvm/bindings/go/llvm
Is this an existing mistake in the documentation? Can you just push this as an NFC commit? No need to bury it in this patch.
Since this accesses multiple disjoint memory locations, the Size is not MemVT.getStoreSize(). It probably needs to always be unknown. I guess it would be if the stride were statically known to be 0, but not sure it is worth special casing that.
Same as load, the Size can't be based on the store type.
This Size doesn't make sense. I think it needs to be unknown.
Can these be SmallVectorImpl<SDValue>?
Does anyone know if we should be passing AAInfo here?
(Non-stride) VPLoad doesn't do that, so we can fix both in a later change if necessary.
- add documentation for the new intrinsics
- use MemoryLocation::UnknownSize
- use SmallVectorImpl<SDValue> in functions signatures
I'll fix visitVPLoadGather and visitVPStoreScatter above in a later change.
This will require an explicit return type because of opaque pointers, as in 6213f1dd03e27fd2483f8ac775a346de8e873573
- use explicit return type in Intrinsic::getDeclaration() for experimental_vp_strided_load
- get first argument type from first operand in Intrinsic::getDeclaration() for experimental_vp_strided_store
I think mentioning that the align parameter can be used (and correctly handling that further down in SelectionDAG) would be good.
- Mention that the align parameter attribute can be provided for the base pointer operands
Reflecting on how the strided versions work, I was thinking if, semantically speaking, it would be better to define the pointer operand as a pointer to the scalar element type of the data/return operand instead of a pointer to a vector (this is only relevant while opaque pointers are not the default)
- Changed the pointer operand type to match the scalar elements type of the data/return operand
The stride can have a different number of bits than the ptr.