- 
                Notifications
    You must be signed in to change notification settings 
- Fork 15k
[LV][EVL] Emit vp.merge intrinsic to enable out-loop reduction in EVL vectorization. #101641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            35 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      49ca386
              
                Remove the FIXME
              
              
                Mel-Chen 41823f0
              
                VPlan Pattern match for Instruction::Select
              
              
                Mel-Chen d4307d0
              
                Init implement TU select
              
              
                Mel-Chen 453bc3b
              
                Transform select(HeaderMask, LHS, RHS)
              
              
                Mel-Chen 5a4aba6
              
                Add vplan test for cond reduction with basic block.
              
              
                Mel-Chen 7b21944
              
                Revert "Add vplan test for cond reduction with basic block."
              
              
                Mel-Chen 8660beb
              
                Sort code and comments.
              
              
                Mel-Chen fd5a5de
              
                Force to predicate a reduction operation when fold by EVL.
              
              
                Mel-Chen 6052fa8
              
                Rebase and update test case.
              
              
                Mel-Chen 32556dd
              
                Rebase and updated
              
              
                Mel-Chen 5636af8
              
                Updated VPlanVerifier
              
              
                Mel-Chen ca9e34a
              
                Updated test case
              
              
                Mel-Chen 921931a
              
                Updated VPlanAnalysis
              
              
                Mel-Chen c6a389d
              
                Move Ctx into transformRecipestoEVLRecipes
              
              
                Mel-Chen a52d3de
              
                Comment for all true condition. nfc
              
              
                Mel-Chen 9f4f2b8
              
                Remove unnecessary code
              
              
                Mel-Chen 31c3e70
              
                NEED_FIX: Requires cost of vp.merge in RISCV TTI
              
              
                Mel-Chen efebb1d
              
                Emit VPWidenIntrinsicRecipe
              
              
                Mel-Chen 7cce658
              
                Update VPlanVerify
              
              
                Mel-Chen d88b12b
              
                Update test case
              
              
                Mel-Chen 36c857b
              
                Revert "NEED_FIX: Requires cost of vp.merge in RISCV TTI"
              
              
                Mel-Chen bc20d2a
              
                Revert "Update VPlanVerify"
              
              
                Mel-Chen ba74ffd
              
                Rebase and update test cases
              
              
                Mel-Chen 02475a0
              
                Revert "Updated VPlanVerifier"
              
              
                Mel-Chen 5b2ee05
              
                Revert "Updated VPlanAnalysis"
              
              
                Mel-Chen f35fbe6
              
                Remove VPInstruction::MergeUntilPivot
              
              
                Mel-Chen 7445806
              
                 Remove irrelevant updates
              
              
                Mel-Chen 2f9c256
              
                Rebase
              
              
                Mel-Chen 908250c
              
                doc the code.
              
              
                Mel-Chen d020ce0
              
                drop the blank line
              
              
                Mel-Chen 012079e
              
                Refine constructor of VPWidenIntrinsicRecipe
              
              
                Mel-Chen f5ad37e
              
                Refine the  comments according to Florian's comment
              
              
                Mel-Chen 8d9daf6
              
                Updated test case
              
              
                Mel-Chen e8cb377
              
                Rebase and update test case
              
              
                Mel-Chen 53d9ac6
              
                Updated comment
              
              
                Mel-Chen File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be sufficient to adjust the reduction phi recipe when introducing EVL recipes instead?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be adjusted in the EVL transformation. patch 8a3982f
But I don't recommend this. Such an implementation is more complicated, especially after the non-predicated reduction select may sink out of the vectorized loop in the future VPlan transformation.
Could you point out why you want to adjust it in the EVL transformation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, everything EVL related is applied during the transform that introduces EVL recipes; one potential issue is that we assume EVL is used here, but the transform may not apply.
Don't have any strong preferences, doing it later indeed seems to require some extra work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've raised a good point.
Adjusting the reduction phi too early can indeed cause some issues. Fortunately, this issue is related to performance rather than correctness. We can proceed with this approach for now and address this performance issue in a later patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. to me