-
Notifications
You must be signed in to change notification settings - Fork 15.1k
AMDGPU: Add uniformity analysis test for G_ZEXTLOAD and G_SEXTLOAD #157844
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
Conversation
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
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Member
|
@llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-backend-amdgpu Author: Petar Avramovic (petar-avramovic) ChangesFull diff: https://github.com/llvm/llvm-project/pull/157844.diff 1 Files Affected:
diff --git a/llvm/test/Analysis/UniformityAnalysis/AMDGPU/MIR/loads-gmir.mir b/llvm/test/Analysis/UniformityAnalysis/AMDGPU/MIR/loads-gmir.mir
index a8f853ade9968..cb3c2de5b8753 100644
--- a/llvm/test/Analysis/UniformityAnalysis/AMDGPU/MIR/loads-gmir.mir
+++ b/llvm/test/Analysis/UniformityAnalysis/AMDGPU/MIR/loads-gmir.mir
@@ -35,3 +35,69 @@ body: |
SI_RETURN
...
+
+---
+name: zext_loads
+tracksRegLiveness: true
+body: |
+ bb.1.entry:
+ %1:_(p0) = G_IMPLICIT_DEF
+ %4:_(p1) = G_IMPLICIT_DEF
+ %6:_(p5) = G_IMPLICIT_DEF
+
+ ; Atomic load
+ ; CHECK-NOT: DIVERGENT
+
+ %0:_(s32) = G_ZEXTLOAD %1(p0) :: (load seq_cst (s16) from `ptr undef`)
+
+ ; flat load
+ ; CHECK-NOT: DIVERGENT
+
+ %2:_(s32) = G_ZEXTLOAD %1(p0) :: (load (s16) from `ptr undef`)
+
+ ; Gloabal load
+ ; CHECK-NOT: DIVERGENT
+ %3:_(s32) = G_ZEXTLOAD %4(p1) :: (load (s16) from `ptr addrspace(1) undef`, addrspace 1)
+
+ ; Private load
+ ; CHECK-NOT: DIVERGENT
+ %5:_(s32) = G_ZEXTLOAD %6(p5) :: (volatile load (s16) from `ptr addrspace(5) undef`, addrspace 5)
+ G_STORE %2(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ G_STORE %3(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ G_STORE %5(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ G_STORE %0(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ SI_RETURN
+
+...
+
+---
+name: sext_loads
+tracksRegLiveness: true
+body: |
+ bb.1.entry:
+ %1:_(p0) = G_IMPLICIT_DEF
+ %4:_(p1) = G_IMPLICIT_DEF
+ %6:_(p5) = G_IMPLICIT_DEF
+
+ ; Atomic load
+ ; CHECK-NOT: DIVERGENT
+ %0:_(s32) = G_SEXTLOAD %1(p0) :: (load seq_cst (s16) from `ptr undef`)
+
+ ; flat load
+ ; CHECK-NOT: DIVERGENT
+ %2:_(s32) = G_SEXTLOAD %1(p0) :: (load (s16) from `ptr undef`)
+
+ ; Gloabal load
+ ; CHECK-NOT: DIVERGENT
+ %3:_(s32) = G_SEXTLOAD %4(p1) :: (load (s16) from `ptr addrspace(1) undef`, addrspace 1)
+
+ ; Private load
+ ; CHECK-NOT: DIVERGENT
+ %5:_(s32) = G_SEXTLOAD %6(p5) :: (volatile load (s16) from `ptr addrspace(5) undef`, addrspace 5)
+ G_STORE %2(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ G_STORE %3(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ G_STORE %5(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ G_STORE %0(s32), %4(p1) :: (volatile store (s32) into `ptr addrspace(1) undef`, addrspace 1)
+ SI_RETURN
+
+...
|
Pierre-vh
approved these changes
Sep 10, 2025
25416b0 to
6b0c5c3
Compare
Collaborator
Author
Merge activity
|
720000d to
bfa8de6
Compare
bfa8de6 to
bb121e2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.

No description provided.