On 12/19/24 12:56 AM, Robin Dapp wrote:
From: Yunze Zhu <yunze...@linux.alibaba.com>
Fix a bug th.vsetvli generates from vext_x_v with an imm operand,
which reports illegal operand. This patch fix this by replacing
imm operand with reg operand in th.vsetvli.
LGTM but you might want to add check force_vector_length_operand
which likely needs similar handling.
Note that I'm also working with Jinma on a potentially related issue.
In addition to fixing some initial codegen issues, there's concerns that
IRA/LRA is substituting the constant back into the vsetvl instructions
which doesn't work for thead.
Anyway I think Yunze's patch probably stands on its own and is a step in
the right direction. I'm inclined to commit it independently of Jinma's
efforts.
jeff