Skip to content

AMDGPU: Replace i16 undefs with poison in tests #131084

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

arsenm
Copy link
Contributor

@arsenm arsenm commented Mar 13, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Mar 13, 2025

@llvmbot
Copy link
Member

llvmbot commented Mar 13, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

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

2 Files Affected:

  • (modified) llvm/test/CodeGen/AMDGPU/inline-constraints.ll (+3-3)
  • (modified) llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll (+2-2)
diff --git a/llvm/test/CodeGen/AMDGPU/inline-constraints.ll b/llvm/test/CodeGen/AMDGPU/inline-constraints.ll
index 2888fd77a9b53..3aa6f3a43d2ee 100644
--- a/llvm/test/CodeGen/AMDGPU/inline-constraints.ll
+++ b/llvm/test/CodeGen/AMDGPU/inline-constraints.ll
@@ -295,7 +295,7 @@ define i32 @inline_A_constraint_V1() {
 
 ; NOGCN: error: invalid operand for inline asm constraint 'A'
 define i32 @inline_A_constraint_V2() {
-  %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 -4, i16 undef>)
+  %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 -4, i16 poison>)
   ret i32 %v0
 }
 
@@ -456,7 +456,7 @@ define i32 @inline_I_constraint_V1() {
 
 ; NOGCN: error: invalid operand for inline asm constraint 'I'
 define i32 @inline_I_constraint_V2() {
-  %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 -4, i16 undef>)
+  %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 -4, i16 poison>)
   ret i32 %v0
 }
 
@@ -1160,7 +1160,7 @@ define i32 @inline_DA_constraint_V1() {
 
 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
 define i32 @inline_DA_constraint_V2() {
-  %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i16> <i16 -4, i16 undef>)
+  %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i16> <i16 -4, i16 poison>)
   ret i32 %v0
 }
 
diff --git a/llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll b/llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
index fe45d7d0284bb..21aa40d69998e 100644
--- a/llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
+++ b/llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
@@ -4249,7 +4249,7 @@ define amdgpu_kernel void @v_test_v2i16_x_add_undef_neg32(ptr addrspace(1) %out,
   %gep = getelementptr inbounds <2 x i16>, ptr addrspace(1) %in, i64 %tid.ext
   %gep.out = getelementptr inbounds <2 x i16>, ptr addrspace(1) %out, i64 %tid.ext
   %x = load <2 x i16>, ptr addrspace(1) %gep
-  %result = add <2 x i16> %x, <i16 undef, i16 -32>
+  %result = add <2 x i16> %x, <i16 poison, i16 -32>
   store <2 x i16> %result, ptr addrspace(1) %gep.out
   ret void
 }
@@ -4403,7 +4403,7 @@ define amdgpu_kernel void @v_test_v2i16_x_add_neg32_undef(ptr addrspace(1) %out,
   %gep = getelementptr inbounds <2 x i16>, ptr addrspace(1) %in, i64 %tid.ext
   %gep.out = getelementptr inbounds <2 x i16>, ptr addrspace(1) %out, i64 %tid.ext
   %x = load <2 x i16>, ptr addrspace(1) %gep
-  %result = add <2 x i16> %x, <i16 -32, i16 undef>
+  %result = add <2 x i16> %x, <i16 -32, i16 poison>
   store <2 x i16> %result, ptr addrspace(1) %gep.out
   ret void
 }

Copy link
Contributor

@pravinjagtap pravinjagtap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor Author

arsenm commented Mar 13, 2025

Merge activity

  • Mar 13, 7:43 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 13, 7:50 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 13, 7:52 AM EDT: A user merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/amdgpu/tests-replace-half-undef-with-poison branch from fc73493 to b52da11 Compare March 13, 2025 11:45
Base automatically changed from users/arsenm/amdgpu/tests-replace-half-undef-with-poison to main March 13, 2025 11:47
@arsenm arsenm force-pushed the users/arsenm/amdgpu/tests-replace-i16-undef-with-poison branch from f66d04c to 5d77e1c Compare March 13, 2025 11:49
@arsenm arsenm merged commit 1eb5588 into main Mar 13, 2025
6 of 10 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/tests-replace-i16-undef-with-poison branch March 13, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants