fallback: translate: phi <vscale x N x double>

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: phi <vscale x N x double> M
Occurrences:3 in 3 configs, 1 test files, 9 more counted only
Snippet from:vsetvli-insert-crossbb.323c84b100.ll (mutant of vsetvli-insert-crossbb.ll) @test1 via llvm-extract
Config:-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v,+zicond -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i32

; Function Attrs: nounwind
define <vscale x 1 x double> @test1(i64 %avl, i8 zeroext %cond, <vscale x 1 x double> %a, <vscale x 1 x double> %b) #0 {
entry:
  %LGV = load i32, ptr @G, align 4
  %C = icmp sgt i32 %LGV, 0
  %0 = tail call i64 @llvm.riscv.vsetvli.i64(i64 %avl, i64 3, i64 0)
  br i1 %C, label %if.else, label %if.then

if.then:                                          ; preds = %entry
  %1 = tail call <vscale x 1 x double> @llvm.riscv.vfadd.nxv1f64.nxv1f64.i64(<vscale x 1 x double> poison, <vscale x 1 x double> %a, <vscale x 1 x double> %b, i64 7, i64 %0)
  br label %if.end

if.else:                                          ; preds = %entry
  %2 = tail call <vscale x 1 x double> @llvm.riscv.vfsub.nxv1f64.nxv1f64.i64(<vscale x 1 x double> poison, <vscale x 1 x double> %a, <vscale x 1 x double> %b, i64 7, i64 %0)
  br label %if.end

if.end:                                           ; preds = %if.else, %if.then
  %c.0 = phi <vscale x 1 x double> [ %1, %if.then ], [ %2, %if.else ]
  ret <vscale x 1 x double> %c.0
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare <vscale x 1 x double> @llvm.riscv.vfadd.nxv1f64.nxv1f64.i64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, i64 immarg, i64) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare <vscale x 1 x double> @llvm.riscv.vfsub.nxv1f64.nxv1f64.i64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, i64 immarg, i64) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.riscv.vsetvli.i64(i64, i64 immarg, i64 immarg) #1

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

Reproduce:

llc -mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v,+zicond -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v,+zicond -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: phi: '  %c.0 = phi <vscale x 1 x double> [ %1, %if.then ], [ %2, %if.else ]' (in function: test1)
warning: Instruction selection used fallback path for test1

Occurrences (3):

InputFunctionConfig
vsetvli-insert-crossbb.323c84b100.ll (mutant of vsetvli-insert-crossbb.ll)test1-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v,+zicond -O0
vsetvli-insert-crossbb.c7d48840ee.ll (mutant of vsetvli-insert-crossbb.ll)test2-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v,+zfa -O3
vsetvli-insert-crossbb.ca6595c3dd.ll (mutant of vsetvli-insert-crossbb.ll)test8-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v -O1

Generated 2026-11-29 14:49 UTC.