Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tmiasko opened this issue Sep 2, 2020 · 0 comments · Fixed by #76263
Closed
Labels
A-codegen Area: Code generation A-mir-opt Area: MIR optimizations C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tmiasko
Copy link
Contributor

tmiasko commented Sep 2, 2020

#![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.

@tmiasko tmiasko added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 2, 2020
@jonas-schievink jonas-schievink added A-codegen Area: Code generation A-mir-opt Area: MIR optimizations requires-nightly This issue requires a nightly compiler in some way. labels Sep 2, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 5, 2020
…ecstatic-morse

inliner: Check for codegen fn attributes compatibility

* Check for target features compatibility
* Check for no_sanitize attribute compatibility

Fixes rust-lang#76259.
@bors bors closed this as completed in b4d3873 Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-mir-opt Area: MIR optimizations C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants