Skip to content

Conversation

@petar-avramovic
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

petar-avramovic commented Sep 10, 2025

@petar-avramovic petar-avramovic marked this pull request as ready for review September 10, 2025 12:33
@llvmbot llvmbot added backend:AMDGPU llvm:analysis Includes value tracking, cost tables and constant folding labels Sep 10, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 10, 2025

@llvm/pr-subscribers-llvm-analysis

@llvm/pr-subscribers-backend-amdgpu

Author: Petar Avramovic (petar-avramovic)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/157844.diff

1 Files Affected:

  • (modified) llvm/test/Analysis/UniformityAnalysis/AMDGPU/MIR/loads-gmir.mir (+66)
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
+
+...

@petar-avramovic petar-avramovic force-pushed the users/petar-avramovic/extload-test branch from 25416b0 to 6b0c5c3 Compare September 10, 2025 13:05
Copy link
Collaborator Author

petar-avramovic commented Sep 10, 2025

Merge activity

  • Sep 10, 1:05 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 1:08 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 1:25 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 1:28 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 1:36 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 1:39 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 1:58 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 2:01 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 2:04 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 2:11 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 2:16 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 10, 3:16 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 10, 3:19 PM UTC: @petar-avramovic merged this pull request with Graphite.

@petar-avramovic petar-avramovic force-pushed the users/petar-avramovic/extload-test branch 10 times, most recently from 720000d to bfa8de6 Compare September 10, 2025 14:15
@petar-avramovic petar-avramovic force-pushed the users/petar-avramovic/extload-test branch from bfa8de6 to bb121e2 Compare September 10, 2025 14:33
@petar-avramovic petar-avramovic merged commit 7d36727 into main Sep 10, 2025
9 checks passed
@petar-avramovic petar-avramovic deleted the users/petar-avramovic/extload-test branch September 10, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:AMDGPU llvm:analysis Includes value tracking, cost tables and constant folding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants