fallback: legalize: G_CTLZ
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | fallback |
| Category: | legalize: G_CTLZ M |
| Occurrences: | 4 in 4 configs, 4 test files, 97 more counted only |
| Snippet from: | sadd_sat.03c527871f.ll (mutant of sadd_sat.ll) @func2 via llvm-extract |
| Config: | -mtriple=riscv32 -mattr=+m,+zbb -O3 -verify-machineinstrs |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
@G = external global i128
@G.1 = external global i128
; Function Attrs: nounwind
define i64 @func2(i64 %x, i64 %y) #0 {
%LGV1 = load i128, ptr @G.1, align 4
%LGV = load i128, ptr @G, align 4
%B = srem i128 %LGV, %LGV1
%tmp = call i64 @llvm.sadd.sat.i64(i64 %x, i64 %y)
store i128 %B, ptr @G, align 4
ret i64 %tmp
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.sadd.sat.i64(i64, i64) #1
attributes #0 = { nounwind }
attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
Reproduce:
llc -mtriple=riscv32 -mattr=+m,+zbb -O3 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+m,+zbb -O3 -verify-machineinstrs -global-isel=0 snippet.ll -o -
Local llc output:
remark: <unknown>:0:0: unable to legalize instruction: %1321:_(i32) = G_CTLZ %17:_(i128) (in function: func2)
warning: Instruction selection used fallback path for func2
Occurrences (4):
| Input | Function | Config |
|---|
| fixed-vectors-cttz.02edb9e91a.ll (mutant of fixed-vectors-cttz.ll) | cttz_v8i16 | -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O3 -code-model=medium |
| sadd_sat.03c527871f.ll (mutant of sadd_sat.ll) | func2 | -mtriple=riscv32 -mattr=+m,+zbb -O3 -verify-machineinstrs |
| short-forward-branch-opt-min-max.e3f0279872.ll (mutant of short-forward-branch-opt-min-max.ll) | select_example_smax_1 | -mtriple=riscv32 -mattr=+zbb,+short-forward-branch-iminmax,+zicond -O2 -verify-machineinstrs |
| usub_sat.b9640aac91.ll (mutant of usub_sat.ll) | fun10 | -mtriple=riscv32 -mattr=+m,+zbb,+v,+zfa -O0 -code-model=medium -verify-machineinstrs |
Generated 2026-11-29 14:49 UTC.