rust/compiler/rustc_codegen_llvm/src
bors bb587b1a17 Auto merge of #80652 - calebzulawski:simd-lanes, r=nagisa
Improve SIMD type element count validation

Resolves rust-lang/stdsimd#53.

These changes are motivated by `stdsimd` moving in the direction of const generic vectors, e.g.:
```rust
#[repr(simd)]
struct SimdF32<const N: usize>([f32; N]);
```

This makes a few changes:
* Establishes a maximum SIMD lane count of 2^16 (65536).  This value is arbitrary, but attempts to validate lane count before hitting potential errors in the backend.  It's not clear what LLVM's maximum lane count is, but cranelift's appears to be much less than `usize::MAX`, at least.
* Expands some SIMD intrinsics to support arbitrary lane counts.  This resolves the ICE in the linked issue.
* Attempts to catch invalid-sized vectors during typeck when possible.

Unresolved questions:
* Generic-length vectors can't be validated in typeck and are only validated after monomorphization while computing layout.  This "works", but the errors simply bail out with no context beyond the name of the type.  Should these errors instead return `LayoutError` or otherwise provide context in some way?  As it stands, users of `stdsimd` could trivially produce monomorphization errors by making zero-length vectors.

cc `@bjorn3`
2021-02-07 22:25:14 +00:00
..
back rustc: Stabilize -Zrun-dsymutil as -Csplit-debuginfo 2021-01-28 08:51:11 -08:00
coverageinfo remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
debuginfo Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
llvm Add a new ABI to support cmse_nonsecure_call 2021-02-02 13:04:31 +00:00
abi.rs Add a new ABI to support cmse_nonsecure_call 2021-02-02 13:04:31 +00:00
allocator.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
asm.rs Add wasm32 support to inline asm 2020-12-01 12:18:21 -06:00
attributes.rs Target stack-probe support configurable finely 2021-01-16 12:38:02 +02:00
base.rs Update and improve rustc_codegen_{llvm,ssa} docs 2020-12-22 19:42:23 -08:00
builder.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
callee.rs rustc_target: Rename some target options to avoid tautology 2020-11-08 17:29:13 +03:00
common.rs Update and improve rustc_codegen_{llvm,ssa} docs 2020-12-22 19:42:23 -08:00
consts.rs Use is_local instead of as_local 2021-02-04 11:17:01 +01:00
context.rs Auto merge of #80652 - calebzulawski:simd-lanes, r=nagisa 2021-02-07 22:25:14 +00:00
declare.rs Make declare_cfn more flexible 2021-01-23 17:19:49 -05:00
intrinsic.rs Make declare_cfn more flexible 2021-01-23 17:19:49 -05:00
lib.rs rustc: Stabilize -Zrun-dsymutil as -Csplit-debuginfo 2021-01-28 08:51:11 -08:00
llvm_util.rs Rollup merge of #81095 - LingMan:unwrap, r=oli-obk 2021-01-17 12:24:59 +00:00
metadata.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
mono_item.rs
type_.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
type_of.rs Revert "cg_llvm: fewer_names in uncached_llvm_type" 2020-12-17 16:40:47 +00:00
va_arg.rs Add big-endian support for AArch64 va_arg 2021-01-27 22:47:56 +00:00
value.rs