Skip to content

LLVM crashes when using prefetch_read_instruction #111823

Closed
@Voultapher

Description

@Voultapher

Code

#![feature(core_intrinsics)]

pub fn x(data: *const u64) {
    unsafe {
        core::intrinsics::prefetch_read_instruction(data, 3);
    }
}

Meta=

rustc --version --verbose:

rustc 1.71.0-nightly (521f4dae1 2023-05-19)
binary: rustc
commit-hash: 521f4dae1bdf7fe9cf9436ecef9ee7c7442708bf
commit-date: 2023-05-19
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.4
Compiler returned: 0

Error output

LLVM ERROR: Cannot select: 0x7f3d820ff1c0: ch = Prefetch<(load (s8) from %ir.0)> 0x7f3d8207c460, 0x7f3d820ff070, Constant:i32<0>, Constant:i32<3>, Constant:i32<0>, example.rs:5:9
  0x7f3d820ff070: i64,ch = CopyFromReg 0x7f3d8207c460, Register:i64 %1, example.rs:5:9
    0x7f3d820ff000: i64 = Register %1
  0x7f3d820ff0e0: i32 = Constant<0>
  0x7f3d820ff150: i32 = Constant<3>
  0x7f3d820ff0e0: i32 = Constant<0>
In function: _ZN7example1x17h72659061d1989aabE
Compiler returned: 101

Metadata

Metadata

Assignees

Labels

C-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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions