[llvm] 08bdff8 - [AMDGPU] Fix error message for illegal copy
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 3 03:48:28 PST 2023
Author: Jay Foad
Date: 2023-03-03T11:46:01Z
New Revision: 08bdff862ca6acf749ac5ddda97f5f15e0f619e1
URL: https://github.com/llvm/llvm-project/commit/08bdff862ca6acf749ac5ddda97f5f15e0f619e1
DIFF: https://github.com/llvm/llvm-project/commit/08bdff862ca6acf749ac5ddda97f5f15e0f619e1.diff
LOG: [AMDGPU] Fix error message for illegal copy
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/illegal-sgpr-to-vgpr-copy.ll
llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 669c6e07a0e33..d75abd8fed750 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -537,7 +537,7 @@ static void reportIllegalCopy(const SIInstrInfo *TII, MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI,
const DebugLoc &DL, MCRegister DestReg,
MCRegister SrcReg, bool KillSrc,
- const char *Msg = "illegal SGPR to VGPR copy") {
+ const char *Msg = "illegal VGPR to SGPR copy") {
MachineFunction *MF = MBB.getParent();
DiagnosticInfoUnsupported IllegalCopy(MF->getFunction(), Msg, DL, DS_Error);
LLVMContext &C = MF->getFunction().getContext();
diff --git a/llvm/test/CodeGen/AMDGPU/illegal-sgpr-to-vgpr-copy.ll b/llvm/test/CodeGen/AMDGPU/illegal-sgpr-to-vgpr-copy.ll
index 10adc3f3af9af..0ff7c19d8d7c7 100644
--- a/llvm/test/CodeGen/AMDGPU/illegal-sgpr-to-vgpr-copy.ll
+++ b/llvm/test/CodeGen/AMDGPU/illegal-sgpr-to-vgpr-copy.ll
@@ -1,7 +1,7 @@
; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck -check-prefix=ERR %s
; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck -check-prefix=GCN %s
-; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_i32 void (): illegal VGPR to SGPR copy
; GCN: ; illegal copy v1 to s9
define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_i32() #0 {
@@ -10,7 +10,7 @@ define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_i32() #0 {
ret void
}
-; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v2i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v2i32 void (): illegal VGPR to SGPR copy
; GCN: ; illegal copy v[0:1] to s[10:11]
define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v2i32() #0 {
%vgpr = call <2 x i32> asm sideeffect "; def $0", "=${v[0:1]}"()
@@ -18,7 +18,7 @@ define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v2i32() #0 {
ret void
}
-; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v4i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v4i32 void (): illegal VGPR to SGPR copy
; GCN: ; illegal copy v[0:3] to s[8:11]
define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v4i32() #0 {
%vgpr = call <4 x i32> asm sideeffect "; def $0", "=${v[0:3]}"()
@@ -26,7 +26,7 @@ define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v4i32() #0 {
ret void
}
-; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v8i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v8i32 void (): illegal VGPR to SGPR copy
; GCN: ; illegal copy v[0:7] to s[8:15]
define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v8i32() #0 {
%vgpr = call <8 x i32> asm sideeffect "; def $0", "=${v[0:7]}"()
@@ -34,7 +34,7 @@ define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v8i32() #0 {
ret void
}
-; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v16i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v16i32 void (): illegal VGPR to SGPR copy
; GCN: ; illegal copy v[0:15] to s[16:31]
define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v16i32() #0 {
%vgpr = call <16 x i32> asm sideeffect "; def $0", "=${v[0:15]}"()
@@ -42,7 +42,7 @@ define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v16i32() #0 {
ret void
}
-; ERR: error: <unknown>:0:0: in function illegal_agpr_to_sgpr_copy_i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_agpr_to_sgpr_copy_i32 void (): illegal VGPR to SGPR copy
; GCN: v_accvgpr_read_b32 [[COPY1:v[0-9]+]], a1
; GCN: ; illegal copy [[COPY1]] to s9
define amdgpu_kernel void @illegal_agpr_to_sgpr_copy_i32() #1 {
@@ -51,7 +51,7 @@ define amdgpu_kernel void @illegal_agpr_to_sgpr_copy_i32() #1 {
ret void
}
-; ERR: error: <unknown>:0:0: in function illegal_agpr_to_sgpr_copy_v2i32 void (): illegal SGPR to VGPR copy
+; ERR: error: <unknown>:0:0: in function illegal_agpr_to_sgpr_copy_v2i32 void (): illegal VGPR to SGPR copy
; GCN-DAG: v_accvgpr_read_b32 v[[COPY1L:[0-9]+]], a0
; GCN-DAG: v_accvgpr_read_b32 v[[COPY1H:[0-9]+]], a1
; GCN: ; illegal copy v[[[COPY1L]]:[[COPY1H]]] to s[10:11]
diff --git a/llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir b/llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir
index c8d52659a1f06..81449347d5786 100644
--- a/llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir
+++ b/llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir
@@ -7,7 +7,7 @@
# GCN-LABEL: {{^}}lo_to_lo_illegal_vgpr_to_sgpr:
# GCN: ; illegal copy v0.l to s1.l
-# ERR: error: <unknown>:0:0: in function lo_to_lo_illegal_vgpr_to_sgpr void (): illegal SGPR to VGPR copy
+# ERR: error: <unknown>:0:0: in function lo_to_lo_illegal_vgpr_to_sgpr void (): illegal VGPR to SGPR copy
name: lo_to_lo_illegal_vgpr_to_sgpr
tracksRegLiveness: true
body: |
@@ -32,7 +32,7 @@ body: |
# GCN-LABEL: {{^}}lo_to_lo_illegal_agpr_to_sgpr:
# GCN: ; illegal copy a0.l to s1.l
-# ERR: error: <unknown>:0:0: in function lo_to_lo_illegal_agpr_to_sgpr void (): illegal SGPR to VGPR copy
+# ERR: error: <unknown>:0:0: in function lo_to_lo_illegal_agpr_to_sgpr void (): illegal VGPR to SGPR copy
name: lo_to_lo_illegal_agpr_to_sgpr
tracksRegLiveness: true
body: |
More information about the llvm-commits
mailing list