Skip to content

[RISCV] Mark vector register used for scalar function? #157783

@zzzhhhl

Description

@zzzhhhl

LLVM will mark vector register as used register with regmask of scalar function.

for example, if we used a fmax (only scalar), llvm will generate a regmask operand. And when we analyze register usage using MRI.isPhysRegUsed(Reg), it shows all the vector register is used. In some scenario, it will cause vector register spill. Does it make senses?

target-flags(riscv-call) @fmax, <regmask $vlenb $x0 $x1 $x8 $x9 $x18 $x19 $x20 $x21 $x22 $x23 $x24 $x25 $x26 $x27 $f8_d $f9_d $f18_d $f19_d $f20_d $f21_d $f22_d $f23_d $f24_d $f25_d $f26_d $f27_d $f8_f $f9_f $f18_f $f19_f $f20_f $f21_f and 24 more...>, implicit-def dead $x1, implicit $f10_d, implicit $f11_d, implicit-def $x2, implicit-def $f10_d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions