vfdff wrote: Can the refactoring approach be like this? > Make sure the const immediate is a positive constant value in the VScale and delete the pattern that matches a negative value from the tablegen. https://github.com/llvm/llvm-project/pull/88108