Skip to content

LLVM error when using f64x8.scatter_select #290

Open
@MattiKrause

Description

@MattiKrause

I tried this code:

#![feature(portable_simd)]
use std::simd::{f64x8, Mask, usizex8};
fn main() {
    let mut vec = vec![0.0; 129];
    call_simd(&mut vec);
}

fn call_simd(target_slice: &mut [f64]) {
    let accumr = f64x8::splat(1.0);
    accumr.scatter_select(target_slice, Mask::splat(true), usizex8::splat(1));
}

When compiling the code with cargo build --release the process crashes with the error message error: failed to parse bitcode for LTO module: Explicit gep type does not match pointee type of pointer operand (Producer: 'LLVM14.0.6-rust-1.64.0-nightly' Reader: 'LLVM 14.0.6-rust-1.64.0-nightly'). The compiler does not crash at a regular cargo build. I cannot reproduce the error in Rust Playground. This example reproduces the result https://godbolt.org/z/ovzYWeT9M

Meta

rustc --version --verbose:

rustc 1.64.0-nightly (7425fb293 2022-06-30)
binary: rustc
commit-hash: 7425fb293f510a6f138e82a963a3bc599a5b9e1c
commit-date: 2022-06-30
host: x86_64-unknown-linux-gnu
release: 1.64.0-nightly
LLVM version: 14.0.6

I do not have stdsimd or any other crate as an explicit dependency. The Rust edition is 2021.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: LLVMC-bugCategory: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions