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

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: phi <vscale x N x double> M
Occurrences:3 in 1 configs, 1 test files, 12 more counted only
Snippet from:vsetvli-insert-crossbb.27797b806f.ll (mutant of vsetvli-insert-crossbb.ll) @test2 via llvm-extract
Config:-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v -O1 -code-model=medium
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define <vscale x 1 x double> @test2(i64 %avl, i8 zeroext %cond, <vscale x 1 x double> %a, <vscale x 1 x double> %b) #0 {
entry:
  %0 = tail call i64 @llvm.riscv.vsetvli.i64(i64 %avl, i64 3, i64 0)
  %tobool = icmp eq i8 %cond, 0
  %B = sdiv i1 %tobool, true
  br i1 %B, 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 ]
  %3 = tail call <vscale x 1 x double> @llvm.riscv.vfmul.nxv1f64.nxv1f64.i64(<vscale x 1 x double> poison, <vscale x 1 x double> %c.0, <vscale x 1 x double> %a, i64 7, i64 %0)
  ret <vscale x 1 x double> %3
}

; 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.vfmul.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 -O1 -code-model=medium -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 -O1 -code-model=medium -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: test2)
warning: Instruction selection used fallback path for test2

Occurrences (3):

InputFunctionConfig
vsetvli-insert-crossbb.27797b806f.ll (mutant of vsetvli-insert-crossbb.ll)test2-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v -O1 -code-model=medium
vsetvli-insert-crossbb.27797b806f.ll (mutant of vsetvli-insert-crossbb.ll)test3-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v -O1 -code-model=medium
vsetvli-insert-crossbb.27797b806f.ll (mutant of vsetvli-insert-crossbb.ll)test8-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+f,+d,+a,+c,+v -O1 -code-model=medium

Generated 2026-11-29 14:49 UTC.