-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
For some reason this only occurs with wasm. If you compile this on the playground, it works just fine until you compile for wasm, which produces this error.
Code
#![feature(repr_simd)]
#[repr(simd)]
pub struct Vector([i32; 4]);
impl Vector {
pub const fn to_array(self) -> [i32; 4] {
self.0
}
}
Meta
rustc --version --verbose
:
rustc 1.50.0-nightly (b32e6e6ac 2020-12-16)
binary: rustc
commit-hash: b32e6e6ac8921035177256ab6806e6ab0d4b9b94
commit-date: 2020-12-16
host: x86_64-apple-darwin
release: 1.50.0-nightly
Error output
Invalid bitcast
%4 = bitcast <4 x i32> %1 to [4 x i32], !dbg !21
in function _ZN10playground6Vector8to_array17h22d416c39ac2333dE
LLVM ERROR: Broken function found, compilation aborted!
Metadata
Metadata
Assignees
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.