[clang] [llvm] [RISCV][llvm] Support fixed-length vector inline assembly constraints (PR #150724)

Brandon Wu via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 21:32:29 PDT 2025


4vtomat wrote:

> Please can you add a LLVM IR test for `llc`?

Yeah sure! 

> I don't think I know enough about the "fixed vectors in scalable vectors" lowering to know if `splitValueIntoRegisterParts` and `joinRegisterPartsIntoValue` are correct but they don't seem so wrong at a glance. I might have expected to see a call to `convertFromScalableVector` (as join and split tend to be symmetric) but I see there's a `getExtractSubvector` already.
The reason I didn't use `convertFromScalableVector` in `joinRegisterPartsIntoValue` is because it's just a wrapper of `getExtractSubvector` with additional assertion. It's guaranteed that those assertion always doesn't fail in this case, so we can just use `getExtractSubvector`.
But yeah I agree with you that it's better to use `convertFromScalableVector` to make the code more readable lol


https://github.com/llvm/llvm-project/pull/150724


More information about the llvm-commits mailing list