[llvm] [SPIRV] Legalize long vectors in GlobalISel (PR #164634)
    Steven Perron via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 07:50:30 PDT 2025
    
    
  
s-perron wrote:
I'd like some feedback on the overall direction I'm going with this. No need for a detailed review yet. I will open smaller PRs (with tests) for parts of these changes. I'd like to know if people agree with some of the major design changes:
1. The post legalizer pass changes from a single pass transformation to a multipass one using a work list. The reason for this change is that we sometime need to look at the operands to determine the type of the new instructions, and we sometimes have to look at it uses. I could also try two pass: a forward pass an a backward pass. I was not able to convince myself that would work in all cases, but I didn't think about it carefully.
2. I want to change the pre-legalizer to not convert G_Bitcast to an intrinsic. It is much more work to legalize the intrinsic. Could we use G_Bitcast and G_Copy working together? I still have to implement that. Is there a reason that will not work?
3. I changed many ops to be flagged as not having side effects. This allows them to be removed during instruction selection if they are trivially dead.
I think those are the major design decision. Let me know if there is any other high level changes you might have concerns about.
https://github.com/llvm/llvm-project/pull/164634
    
    
More information about the llvm-commits
mailing list