[llvm] [RISCV] Don't forward AVL in VSETVLIInfo if it would clobber other definitions (PR #97264)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 09:19:58 PDT 2024


lukel97 wrote:

> As another possible approach to this problem... could we create a new virtual register for the forwarded AVL, use a COPY from the existing range (within it's existing live range), and then a use of the new virtreg at the use point? (Thinking specifically in the case we can't extend the existing use.) This would avoid the need to detect the "illegal to forward" case early.

I've submitted a PR for this in #98342, this turned out to be a good idea. I'd rather we're able to handle non-extendible values via a fallback, than have to conservatively check for extendibility in every place we mutate the AVL, which is more likely to have cases fall through the cracks.

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


More information about the llvm-commits mailing list