[llvm] AMDGPU: Replace i16 undefs with poison in tests (PR #131084)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 13 04:50:05 PDT 2025


https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/131084

>From 5d77e1c08f32c0c2e9ca15fd15203f819bed5555 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 12 Mar 2025 15:05:33 +0700
Subject: [PATCH] AMDGPU: Replace i16 undefs with poison in tests

---
 llvm/test/CodeGen/AMDGPU/inline-constraints.ll      | 6 +++---
 llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

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
 }



More information about the llvm-commits mailing list