[llvm] [LSR] Recognize vscale-relative immediates (PR #88124)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 03:10:19 PDT 2024


davemgreen wrote:

Hi - I have been looking at something that is related but mostly orthogonal to this in the generation of chains for vscale addressing modes recently. I've put the patch up at #94453. I don't think it changes alot of the same code as this patch, which is altering a lot more. That probably turned out to mostly be about how chains are generated. It does make use of the existing isLegalAddressingMode changes which have made it a lot easier since the last time I looked into it.

My high level comment for this patch, after looking into the chains, is the same as it has been elsewhere - that it feels like it is useful to at least conceptually be able to model `Base + Imm + vscale * ScalableImm` with both an Offset and a ScalableOffset treated independently. Even if it is unlikely that they are supported by the assembly, being able to represent them so that it can reason about things like `(Base+Imm) + vscale*ScalableImm` vs `(Base+vscale*ScalableImm) + imm` can be useful. I obviously could be wrong though, as I haven't seen the alternative version and am not sure how difficult it would be in practice.

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


More information about the llvm-commits mailing list