Skip to content

LLVM ERROR: Do not know how to split this operator's operand! with -Zmir-opt-level=2 #76259

Closed

Description

#![crate_type = "lib"]
use std::arch::x86_64::*;

pub unsafe fn f(a: __m256i) -> u32 {
    _mm256_movemask_epi8(a).trailing_zeros()
}
$ rustc a.rs -Zmir-opt-level=2 -C target-cpu=generic
SplitVectorOperand Op #1: t7: i32 = llvm.x86.avx2.pmovmskb TargetConstant:i64<6950>, t6

LLVM ERROR: Do not know how to split this operator's operand!

This looks like an interaction between MIR inliner and #[target_feature(...)].
Most likely inlining shouldn't take place in-between functions with incompatible target features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-mir-optArea: MIR optimizationsC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions