fallback: translate: call llvm.prefetch.p0

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.prefetch.p0 M
Occurrences:4 in 4 configs, 2 test files, 5 more counted only
Snippet from:prefetch.ed36c5753a.ll (mutant of prefetch.ll) @test_prefetch_read_locality_0 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+zba,+zhinx -O3 -code-model=small
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.1 = external global ptr

; 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 ptr, ptr %a, i32 -1
  store ptr %G, ptr @G.1, 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 -verify-machineinstrs -mattr=+zba,+zhinx -O3 -code-model=small -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zba,+zhinx -O3 -code-model=small -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 (4):

InputFunctionConfig
prefetch.aa7bba4df4.ll (mutant of prefetch.ll)test_prefetch_write_locality_2-mtriple=riscv32 -verify-machineinstrs -mattr=+zicbop,+zhinx -O1
prefetch.ba2d491544.ll (mutant of prefetch.ll)test_prefetch_instruction_locality_3-mtriple=riscv64 -mattr=+zhinx -O3 -verify-machineinstrs
prefetch.c1bbfa9ad5.ll (mutant of prefetch.ll)test_prefetch_instruction_locality_1-mtriple=riscv32 -mattr=+zfinx,+zbkb -O0 -verify-machineinstrs
prefetch.ed36c5753a.ll (mutant of prefetch.ll)test_prefetch_read_locality_0-mtriple=riscv32 -verify-machineinstrs -mattr=+zba,+zhinx -O3 -code-model=small

Generated 2026-11-29 14:49 UTC.