fallback: translate: phi <vscale x N x i1>
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | fallback |
| Category: | translate: phi <vscale x N x i1> M |
| Occurrences: | 3 in 2 configs, 1 test files, 36 more counted only |
| Snippet from: | riscv-codegenprepare-asm.7423082c53.ll (mutant of riscv-codegenprepare-asm.ll) @widen_anyof_rdx via llvm-extract |
| Config: | -mtriple=riscv64 -mattr=+v,+zfhmin -O0 -verify-machineinstrs |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
@G = external global i64
define i1 @widen_anyof_rdx(ptr %p, i64 %n) {
entry:
%A = alloca i64, align 8
store i64 poison, ptr %A, align 4
br label %loop
loop: ; preds = %loop, %entry
%iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
%phi = phi <vscale x 4 x i1> [ zeroinitializer, %entry ], [ %rec, %loop ]
%avl = sub i64 %n, %iv
%evl = call i32 @llvm.experimental.get.vector.length.i64(i64 %avl, i32 4, i1 true)
%gep = getelementptr i32, ptr %p, i64 %iv
%x = call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %gep, <vscale x 4 x i1> splat (i1 true), i32 %evl)
%cmp = icmp ne <vscale x 4 x i32> %x, zeroinitializer
%rec = call <vscale x 4 x i1> @llvm.vp.merge.nxv4i1(<vscale x 4 x i1> %cmp, <vscale x 4 x i1> splat (i1 true), <vscale x 4 x i1> %phi, i32 %evl)
%evl.zext = zext i32 %evl to i64
%iv.next = add i64 %iv, %evl.zext
%done = icmp sge i64 %iv.next, %n
br i1 %done, label %exit, label %loop
exit: ; preds = %loop
%LGV = load i64, ptr @G, align 4
%res = call i1 @llvm.vector.reduce.or.nxv4i1(<vscale x 4 x i1> %rec)
%B = xor i64 %n, %LGV
store i64 %B, ptr %A, align 4
ret i1 %res
}
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.experimental.get.vector.length.i64(i64, i32 immarg, i1 immarg) #0
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i1 @llvm.vector.reduce.or.nxv4i1(<vscale x 4 x i1>) #1
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr captures(none), <vscale x 4 x i1>, i32) #2
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <vscale x 4 x i1> @llvm.vp.merge.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>, <vscale x 4 x i1>, i32) #0
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
Reproduce:
llc -mtriple=riscv64 -mattr=+v,+zfhmin -O0 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+v,+zfhmin -O0 -verify-machineinstrs -global-isel=0 snippet.ll -o -
Local llc output:
remark: <unknown>:0:0: unable to translate instruction: phi: ' %phi = phi <vscale x 4 x i1> [ zeroinitializer, %entry ], [ %rec, %loop ]' (in function: widen_anyof_rdx)
warning: Instruction selection used fallback path for widen_anyof_rdx
Occurrences (3):
| Input | Function | Config |
|---|
| riscv-codegenprepare-asm.7423082c53.ll (mutant of riscv-codegenprepare-asm.ll) | widen_anyof_rdx | -mtriple=riscv64 -mattr=+v,+zfhmin -O0 -verify-machineinstrs |
| riscv-codegenprepare-asm.b205fddaa3.ll (mutant of riscv-codegenprepare-asm.ll) | widen_anyof_rdx | -mtriple=riscv64 -mattr=+v,+c,+zvbb -O0 -verify-machineinstrs |
| riscv-codegenprepare-asm.b205fddaa3.ll (mutant of riscv-codegenprepare-asm.ll) | widen_anyof_rdx_use_in_loop | -mtriple=riscv64 -mattr=+v,+c,+zvbb -O0 -verify-machineinstrs |
Generated 2026-11-29 14:49 UTC.