fallback: translate: getelementptr i1

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: getelementptr i1 M
Occurrences:3 in 3 configs, 3 test files, 40 more counted only
Snippet from:mem64.4531a75e.73b4cfcdc5.ll (mutant of mem64.4531a75e.ll) @load_sext_zext_anyext_i1_i16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zdinx -O1
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.1 = external global i1
@G.2 = external global i1

; Function Attrs: nounwind
define dso_local i16 @load_sext_zext_anyext_i1_i16(ptr %a) #0 {
  %1 = getelementptr i1, ptr %a, i32 2
  %LGV = load i1, ptr @G.1, align 1
  %2 = load volatile i1, ptr %a, align 1
  %3 = getelementptr i1, ptr %a, i32 1
  %4 = load i1, ptr %3, align 1
  %5 = load i1, ptr %1, align 1
  %6 = sext i1 %4 to i16
  %7 = zext i1 %5 to i16
  %8 = add i16 %6, %7
  %B = add i1 %LGV, %5
  store i1 %B, ptr @G.2, align 1
  ret i16 %8
}

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zdinx -O1 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zdinx -O1 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: getelementptr: '  %1 = getelementptr i1, ptr %a, i32 2' (in function: load_sext_zext_anyext_i1_i16)
warning: Instruction selection used fallback path for load_sext_zext_anyext_i1_i16

Occurrences (3):

InputFunctionConfig
attributes.c52fe51dde.ll (mutant of attributes.ll)atomic_load_i8_seq_cst-mtriple=riscv32 -mattr=+zca,+zfinx,+zhinx -O1 -code-model=small -verify-machineinstrs
mem.8f2b3cb5.3a22d576.2a74bd7d7b.ll (mutant of mem.8f2b3cb5.3a22d576.ll)load_sext_zext_anyext_i1_i16-mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zfinx -O3
mem64.4531a75e.73b4cfcdc5.ll (mutant of mem64.4531a75e.ll)load_sext_zext_anyext_i1_i16-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zdinx -O1

Generated 2026-11-29 14:49 UTC.