Skip to content

[clang] vsetvli/vsetivli does not permit lmul operand to be optional #143744

Closed
@ThinkOpenly

Description

@ThinkOpenly

The following instructions should all produce the same encoding:


[vsetvli.s.txt](https://github.com/user-attachments/files/20694598/vsetvli.s.txt)

[vsetvli.s.txt](https://github.com/user-attachments/files/20694603/vsetvli.s.txt)

vsetvli t0, a0, 192
vsetvli t0, a0, e8, m1, ta, ma
vsetvli t0, a0, e8, ta, ma

However, clang (20) does not accept the 3rd syntax that omits the lmul operand "m1", which is the default value:

$ clang -c vsetvli.s
vsetvli.s:21:25: error: operand must be e[8|16|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
        vsetvli t0, a0, e8, ta, ma
                        ^

Originally reported riscv-software-src/riscv-unified-db#838.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions