fallback: legalize: G_BSWAP <N x i64>

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:legalize: G_BSWAP <N x i64> M
Occurrences:3 in 3 configs, 1 test files, 11 more counted only
Snippet from:fixed-vectors-bswap.1bb78fcbea.ll (mutant of fixed-vectors-bswap.ll) @bswap_v4i64 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvkb,+zicond,+zbb -O3
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.2 = external global i32

define void @bswap_v4i64(ptr %x, ptr %y) {
  %LGV1 = load i32, ptr @G.2, align 4
  %a = load <4 x i64>, ptr %x, align 32
  %G = getelementptr <4 x i32>, ptr %y, i32 %LGV1
  %c = call <4 x i64> @llvm.bswap.v4i64(<4 x i64> %a)
  store <4 x i64> %c, ptr %x, align 32
  store ptr %G, ptr poison, align 8
  ret void
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i64> @llvm.bswap.v4i64(<4 x i64>) #0

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %8:_(<4 x i64>) = G_BSWAP %4:_ (in function: bswap_v4i64)
warning: Instruction selection used fallback path for bswap_v4i64

Occurrences (3):

InputFunctionConfig
fixed-vectors-bswap.13bed0a0b9.ll (mutant of fixed-vectors-bswap.ll)bswap_v2i64-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zbb -O3
fixed-vectors-bswap.1bb78fcbea.ll (mutant of fixed-vectors-bswap.ll)bswap_v4i64-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvkb,+zicond,+zbb -O3
fixed-vectors-bswap.7424ff454d.ll (mutant of fixed-vectors-bswap.ll)bswap_v4i64-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zvkb,+f,+zbkb -O1

Generated 2026-11-29 14:49 UTC.