[llvm] [GISel] Funnel shift combiner port from SelectionDAG ISel to GlobalISel (PR #135132)
Axel Sorenson via llvm-commits
llvm-commits at lists.llvm.org
Sat May 24 00:08:23 PDT 2025
axelcool1234 wrote:
@mshockwave So I've been exposed to scalable vectors for the first time - I've been exploring how they work in RISC-V (its very interesting). Please tell me if I'm mistaken, but it seems GlobalISel only supports scalable vectors (and not fixed vectors) for arguments to functions. Despite this, it seems most scalable vector instructions are not supported in GlobalISel. All of my fiddling around with LLVM IR is getting me `LLVM ERROR: unable to translate instruction: call` and `LLVM ERROR: unable to lower arguments:` errors. Investigation online leads me to believe that my observations are correct: LLVM lacks [a lot of scalable vector instruction support](https://github.com/sampsyo/cs6120/issues/410). This [talk](https://llvm.org/devmtg/2023-05/slides/Tutorial-May11/01-Bradbury-GlobalISelTutorial.pdf) from 2023 also says on one slide that GlobalISel lacks scalable vector support.
If this is all true, how should I construct these vector tests? Since I can't seem to pass fixed length vectors as arguments, I'm forced to write them in the function body (but this leads to the compiler folding it all down since it statically knows the content of said fixed vectors). Unless there's a better way, perhaps I should look into loading the vector from a pointer or something?
Admittedly, I feel I haven't done enough digging and deeper reading into this. If you have any resources I should really sink my teeth into, I will do so. Thanks again!
https://github.com/llvm/llvm-project/pull/135132
More information about the llvm-commits
mailing list