fallback: translate: call llvm.prefetch.p0

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: call llvm.prefetch.p0 M
Occurrences:3 in 3 configs, 2 test files, 7 more counted only
Snippet from:prefetch.c7d8725b07.ll (mutant of prefetch.ll) @test_prefetch_read_locality_0 via llvm-extract
Config:-mtriple=riscv32 -mattr=+zicbop,+zba,+zdinx -O3 -code-model=medium -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define void @test_prefetch_read_locality_0(ptr %a) #0 {
  call void @llvm.prefetch.p0(ptr %a, i32 0, i32 0, i32 1)
  %G = getelementptr <2 x i64>, ptr %a, i32 -1
  store ptr %G, ptr poison, align 8
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @llvm.prefetch.p0(ptr readonly captures(none), i32 immarg range(i32 0, 2), i32 immarg range(i32 0, 4), i32 immarg range(i32 0, 2)) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) }

Reproduce:

llc -mtriple=riscv32 -mattr=+zicbop,+zba,+zdinx -O3 -code-model=medium -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+zicbop,+zba,+zdinx -O3 -code-model=medium -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.prefetch.p0: '  call void @llvm.prefetch.p0(ptr %a, i32 0, i32 0, i32 1)' (in function: test_prefetch_read_locality_0)
warning: Instruction selection used fallback path for test_prefetch_read_locality_0

Occurrences (3):

InputFunctionConfig
prefetch.1813884be6.ll (mutant of prefetch.ll)test_prefetch_write_locality_3-mtriple=riscv64 -mattr=+zdinx,+zbs -O1 -verify-machineinstrs
prefetch.5a3e05df24.ll (mutant of prefetch.ll)test_prefetch_instruction_locality_1-mtriple=riscv64 -verify-machineinstrs -mattr=+zicbop,+zihintntl,+zdinx -O3
prefetch.c7d8725b07.ll (mutant of prefetch.ll)test_prefetch_read_locality_0-mtriple=riscv32 -mattr=+zicbop,+zba,+zdinx -O3 -code-model=medium -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.