Open
Description
openedon Oct 16, 2024
The context for this is #116558: passing vector types by-value over extern "C"
needs certain registers to be present, so if the target feature enabling these registers is missing, then either the ABI needs to change (which can lead to soundness issues if caller and callee disagree on their target features), or LLVM just errors outright.
#127731 moves us towards detecting this situation, but that approach needs data about which target feature is needed to pass which vector size. That will be different for each architecture. So this issue is about gathering all that data.
- x86 (32bit and 64bit)
- "sse" => vlen(128)
- "avx" => vlen(256)
- "avx512f", "evex512" => vlen(512)
- arm
- "neon" => vlen(128)
- "mve" => ???
- aarch64:
- "neon" => vlen(128)
- "sve" & -Cllvm-args="--aarch64-sve-vector-bits-min={N}" => vlen(N), NOTE: only scalable vectors?
- hexagon
- "hvx-length64b" => vlen(512)
- "hvx-length128b" => vlen(1024)
- powerpc
- "altivec" => vlen(128)
- "mma" => vlen(512), NOTE: not supported by clang
- mips: "msa" => vlen(128)
- riscv
- "zve32x" | "zve32f" => vlen(32),
- "zve64x" | "zve64f" | "zve64d" => vlen(64),
- "zvl128b" | "v" => vlen(128)
- "zvl{N}b" => vlen(N)
- "zvl" & -Cllvm-args="--riscv-v-vector-bits-min={N}" => vlen(N), NOTE: only scalable vectors?
- wasm: "simd128" => vlen(128)
- bpf: none
- csky: "vdsp1" | "vdsp2" => vlen(128),
- loongarch: should have an on-stack ABI
- s390x: "vector" => vlen(128)
- more?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Concerning the application binary interface (ABI)Area: SIMD (Single Instruction Multiple Data)Area: Enabling/disabling target features like AVX, Neon, etc.Category: A tracking issue for an RFC or an unstable feature.Call for partcipation: This issues needs some investigation to determine current statusRelevant to the compiler team, which will review and decide on the PR/issue.