fallback: translate: call llvm.bswap.i64

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.bswap.i64 M
Occurrences:5 in 5 configs, 2 test files, 3 more counted only
Snippet from:bswap-shift.f6be861e88.ll (mutant of bswap-shift.ll) @test_bswap_srli_48_bswap_i64 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.4 = external global i64

; Function Attrs: nounwind
define i64 @test_bswap_srli_48_bswap_i64(i64 %a) #0 {
  %1 = call i64 @llvm.bswap.i64(i64 %a)
  %2 = lshr i64 %1, 48
  %B = lshr i64 %2, %a
  %3 = call i64 @llvm.bswap.i64(i64 %2)
  store i64 %B, ptr @G.4, align 4
  ret i64 %3
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.bswap.i64(i64) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.bswap.i64: '  %1 = call i64 @llvm.bswap.i64(i64 %a)' (in function: test_bswap_srli_48_bswap_i64)
warning: Instruction selection used fallback path for test_bswap_srli_48_bswap_i64

Occurrences (5):

InputFunctionConfig
bswap-bitreverse.04db63aa6b.ll (mutant of bswap-bitreverse.ll)test_bswap_bitreverse_i64-mtriple=riscv32 -verify-machineinstrs -mattr=+xtheadba,+zdinx -O3
bswap-bitreverse.46d8767000.ll (mutant of bswap-bitreverse.ll)test_bswap_bitreverse_i64-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zfinx -O1 -code-model=small
bswap-bitreverse.4a51197194.ll (mutant of bswap-bitreverse.ll)test_bswap_bitreverse_i64-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+experimental-p,+zbs,+zdinx -O3
bswap-bitreverse.f777d90fa7.ll (mutant of bswap-bitreverse.ll)test_bswap_bitreverse_i64-mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zdinx -O0
bswap-shift.f6be861e88.ll (mutant of bswap-shift.ll)test_bswap_srli_48_bswap_i64-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O0

Generated 2026-11-29 14:49 UTC.