This patch introduces two new experimental IR intrinsics and SDAG nodes to represent vector strided loads and stores.
Details
Diff Detail
Time | Test | |
---|---|---|
60,160 ms | x64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vloxseg.c Script:
--
: 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +zfh -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg.c
| |
60,100 ms | x64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vlsegff.c Script:
--
: 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv32 -target-feature +f -target-feature +d -target-feature +v -target-feature +zfh -disable-O0-optnone -fallow-half-arguments-and-returns -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vlsegff.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV32 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vlsegff.c
| |
60,140 ms | x64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vluxseg.c Script:
--
: 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +zfh -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vluxseg.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vluxseg.c
| |
60,100 ms | x64 debian > Clang.CodeGen/RISCV/rvv-intrinsics-overloaded::vloxseg.c Script:
--
: 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vloxseg.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vloxseg.c
| |
60,230 ms | x64 debian > Clang.CodeGen/RISCV/rvv-intrinsics-overloaded::vluxseg.c Script:
--
: 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vluxseg.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vluxseg.c
| |
View Full Test Results (9 Failed) |
Event Timeline
llvm/include/llvm/IR/VPIntrinsics.def | ||
---|---|---|
253 | 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. | |
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
8039 | 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. | |
8172 | Same as load, the Size can't be based on the store type. | |
8228 | Same | |
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
7488 | This Size doesn't make sense. I think it needs to be unknown. | |
7509 | Same | |
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | ||
574 | Can these be SmallVectorImpl<SDValue>? |
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
---|---|---|
7476 | 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. |
ChangeLog:
- add documentation for the new intrinsics
- use MemoryLocation::UnknownSize
- use SmallVectorImpl<SDValue> in functions signatures
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | ||
---|---|---|
574 | I'll fix visitVPLoadGather and visitVPStoreScatter above in a later change. |
llvm/lib/IR/IntrinsicInst.cpp | ||
---|---|---|
510 | This will require an explicit return type because of opaque pointers, as in 6213f1dd03e27fd2483f8ac775a346de8e873573 |
Changelog:
- 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
llvm/docs/LangRef.rst | ||
---|---|---|
19964 | I think mentioning that the align parameter can be used (and correctly handling that further down in SelectionDAG) would be good. |
Changelog:
- Mention that the align parameter attribute can be provided for the base pointer operands
llvm/docs/LangRef.rst | ||
---|---|---|
19952 | 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) |
llvm/docs/LangRef.rst | ||
---|---|---|
19952 | Agreed. Typed pointers will go away but we shouldn't be sloppy here. |
Changelog:
- Changed the pointer operand type to match the scalar elements type of the data/return operand
llvm/docs/LangRef.rst | ||
---|---|---|
19980 | The stride can have a different number of bits than the ptr. |