fallback: legalize: G_PHI <2 x s64>
| Run: | explore-bc8218b282-20261015-075519 |
| Kind: | fallback |
| Category: | legalize: G_PHI <2 x s64> NEW |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | switch-width.dca150b558.ll (mutant of switch-width.ll) @trunc_i17 via llvm-extract |
| Config: | -O2 -mtriple=riscv64 |
| Local check: | reproduces at bc8218b282 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
@G.1 = external global <2 x i64>
define i32 @trunc_i17(i64 %a) {
entry:
%A = alloca <2 x i64>, align 16
store <2 x i64> poison, ptr %A, align 16
%trunc = trunc i64 %a to i17
switch i17 %trunc, label %sw.default [
i17 1, label %sw.bb0
i17 -1, label %sw.bb1
]
sw.bb0: ; preds = %entry
%LGV = load <2 x i64>, ptr @G.1, align 16
br label %return
sw.bb1: ; preds = %entry
br label %return
sw.default: ; preds = %entry
br label %return
return: ; preds = %sw.default, %sw.bb1, %sw.bb0
%0 = phi <2 x i64> [ splat (i64 -9223372036854775808), %sw.default ], [ splat (i64 1), %sw.bb1 ], [ %LGV, %sw.bb0 ]
%retval = phi i32 [ -1, %sw.default ], [ 0, %sw.bb0 ], [ 1, %sw.bb1 ]
store <2 x i64> %0, ptr %A, align 16
ret i32 %retval
}
Reproduce:
llc -O2 -mtriple=riscv64 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -O2 -mtriple=riscv64 -global-isel=0 snippet.ll -o -
Local llc output:
remark: <unknown>:0:0: unable to legalize instruction: %11:_(<2 x s64>) = G_PHI %14:_(<2 x s64>), %bb.4, %16:_(<2 x s64>), %bb.3, %9:_(<2 x s64>), %bb.2 (in function: trunc_i17)
warning: Instruction selection used fallback path for trunc_i17
Occurrences (1):
| Input | Function | Config |
|---|
| switch-width.dca150b558.ll (mutant of switch-width.ll) | trunc_i17 | -O2 -mtriple=riscv64 |
Generated 2026-10-15 08:05 UTC.