forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU] Fix a potential wrong return value indicating whether a pass…
… modifies a function (llvm#88197) When the alloca is too big for vectorization, the function could have already been modified in previous iteration of the `for` loop.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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,11 @@ | ||
; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes="amdgpu-promote-alloca-to-vector" -o - %s | ||
; We don't really need to check anything here because with expensive check, this | ||
; test case crashes. The correctness of the pass is beyond the scope. | ||
|
||
define fastcc void @foo() { | ||
entry: | ||
%det = alloca [4 x i32], align 16, addrspace(5) | ||
%trkltPosTmpYZ = alloca [2 x float], align 4, addrspace(5) | ||
%trkltCovTmp = alloca [3 x float], align 4, addrspace(5) | ||
ret void | ||
} |