fallback: translate: phi <vscale x N x i1>
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | fallback |
| Category: | translate: phi <vscale x N x i1> M |
| Occurrences: | 4 in 3 configs, 2 test files, 60 more counted only |
| Snippet from: | riscv-codegenprepare-asm.2ed418ffd5.ll (mutant of riscv-codegenprepare-asm.ll) @widen_anyof_rdx_use_in_loop via llvm-extract |
| Config: | -mtriple=riscv64 -mattr=+v,+zvkb -O0 -verify-machineinstrs |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
@G.2 = external global i64
define i1 @widen_anyof_rdx_use_in_loop(ptr %p, i64 %n) {
entry:
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)
store <vscale x 4 x i1> %rec, ptr %gep, align 1
%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
%LGV1 = load i64, ptr @G.2, align 4
%C = icmp slt i64 %n, %LGV1
ret i1 %C
}
; 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 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) #1
; 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 nofree nosync nounwind willreturn memory(argmem: read) }
Reproduce:
llc -mtriple=riscv64 -mattr=+v,+zvkb -O0 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+v,+zvkb -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_use_in_loop)
warning: Instruction selection used fallback path for widen_anyof_rdx_use_in_loop
Occurrences (4):
| Input | Function | Config |
|---|
| float-convert.5336bd03.4390f218.60ff9ca0.d6d6e1e1.8605cc71.00966a8a.3bc8c1dd94.ll (mutant of float-convert.5336bd03.4390f218.60ff9ca0.d6d6e1e1.8605cc71.00966a8a.ll) | fcvt_lu_s_sat | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zvfh,+zve64d -O0 |
| riscv-codegenprepare-asm.28bb628f32.ll (mutant of riscv-codegenprepare-asm.ll) | widen_anyof_rdx | -mtriple=riscv64 -mattr=+v,+zve64d,+zfh -O0 -verify-machineinstrs |
| riscv-codegenprepare-asm.28bb628f32.ll (mutant of riscv-codegenprepare-asm.ll) | widen_anyof_rdx_use_in_loop | -mtriple=riscv64 -mattr=+v,+zve64d,+zfh -O0 -verify-machineinstrs |
| riscv-codegenprepare-asm.2ed418ffd5.ll (mutant of riscv-codegenprepare-asm.ll) | widen_anyof_rdx_use_in_loop | -mtriple=riscv64 -mattr=+v,+zvkb -O0 -verify-machineinstrs |
Generated 2026-11-29 14:49 UTC.