fallback: legalize: G_CLMULH

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_CLMULH M
Occurrences:3 in 1 configs, 1 test files, 73 more counted only
Snippet from:clmul-rv64.cc3d57b5de.ll (mutant of clmul-rv64.ll) @clmulh_i32 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -O0
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.1 = external global i32

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.riscv.clmulh.i32(i32, i32) #0

define signext i32 @clmulh_i32(i32 signext %a, i32 signext %b) {
  %LGV = load i32, ptr @G.1, align 4
  %B = xor i32 %b, %LGV
  %r = call i32 @llvm.riscv.clmulh.i32(i32 %a, i32 %b)
  store i32 %B, ptr poison, align 4
  ret i32 %r
}

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

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %9:_(i32) = G_CLMULH %0:_, %1:_ (in function: clmulh_i32)
warning: Instruction selection used fallback path for clmulh_i32

Occurrences (3):

InputFunctionConfig
clmul-rv64.cc3d57b5de.ll (mutant of clmul-rv64.ll)clmulh_i32-mtriple=riscv64 -verify-machineinstrs -O0
clmul-rv64.cc3d57b5de.ll (mutant of clmul-rv64.ll)clmulh_i32_zext-mtriple=riscv64 -verify-machineinstrs -O0
clmul-rv64.cc3d57b5de.ll (mutant of clmul-rv64.ll)clmulh_i64-mtriple=riscv64 -verify-machineinstrs -O0

Generated 2026-11-29 14:49 UTC.