- 
                Notifications
    You must be signed in to change notification settings 
- Fork 15k
[LV] Ignore user-specified interleave count when unsafe. #153009
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
          
          
            6 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      938a0e3
              
                [LV] Ignore user-specified interleave count when unsafe.
              
              
                kmclaughlin-arm 31c6578
              
                - Reworded diagnostic message
              
              
                kmclaughlin-arm 20fe702
              
                - Handle UserIC as part of selectInterleaveCount
              
              
                kmclaughlin-arm 17eda94
              
                - Moved UserIC back out of selectInterleaveCount
              
              
                kmclaughlin-arm 444e58c
              
                - Only set UserIC to 1 if an interleave count > 1 was requested
              
              
                kmclaughlin-arm 5ad8fb2
              
                - Add an assert for !isSafeForAnyVectorWidth()
              
              
                kmclaughlin-arm 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
          Some comments aren't visible on the classic Files Changed page.
        
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
    
  
  
    
              
        
          
          
            30 changes: 30 additions & 0 deletions
          
          30 
        
  llvm/test/Transforms/LoopVectorize/unsafe-ic-hint-remark.ll
  
  
      
      
   
        
      
      
    
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ; RUN: opt -passes=loop-vectorize -pass-remarks-analysis=loop-vectorize -S < %s 2>&1 | FileCheck %s | ||
|  | ||
| ; Make sure the unsafe user specified interleave count is ignored. | ||
|  | ||
| ; CHECK: remark: <unknown>:0:0: Ignoring user-specified interleave count due to possibly unsafe dependencies in the loop. | ||
| ; CHECK-LABEL: @loop_distance_4 | ||
| define void @loop_distance_4(ptr %a, ptr %b) { | ||
| entry: | ||
| br label %loop | ||
|  | ||
| loop: | ||
| %iv = phi i64 [ 4, %entry ], [ %iv.next, %loop ] | ||
| %0 = getelementptr i32, ptr %b, i64 %iv | ||
| %arrayidx = getelementptr i8, ptr %0, i64 -16 | ||
| %1 = load i32, ptr %arrayidx, align 4 | ||
| %arrayidx2 = getelementptr inbounds nuw i32, ptr %a, i64 %iv | ||
| %2 = load i32, ptr %arrayidx2, align 4 | ||
| %add = add nsw i32 %2, %1 | ||
| store i32 %add, ptr %0, align 4 | ||
| %iv.next = add nuw nsw i64 %iv, 1 | ||
| %exitcond.not = icmp eq i64 %iv.next, 64 | ||
| br i1 %exitcond.not, label %for.end, label %loop, !llvm.loop !1 | ||
|  | ||
| for.end: | ||
| ret void | ||
| } | ||
|  | ||
| !1 = !{!1, !2, !3} | ||
| !2 = !{!"llvm.loop.interleave.count", i32 4} | ||
| !3 = !{!"llvm.loop.vectorize.width", i32 4} | 
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.