[llvm] 26ebc51 - AMDGPU/GlobalISel: Fix smrd loads of v4i64
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 10:45:03 PDT 2020
Author: Matt Arsenault
Date: 2020-03-24T13:44:41-04:00
New Revision: 26ebc51a34eaeb75ea2cc2c28cdd3caab04f587b
URL: https://github.com/llvm/llvm-project/commit/26ebc51a34eaeb75ea2cc2c28cdd3caab04f587b
DIFF: https://github.com/llvm/llvm-project/commit/26ebc51a34eaeb75ea2cc2c28cdd3caab04f587b.diff
LOG: AMDGPU/GlobalISel: Fix smrd loads of v4i64
Added:
Modified:
llvm/lib/Target/AMDGPU/SIRegisterInfo.td
llvm/lib/Target/AMDGPU/SMInstructions.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.td b/llvm/lib/Target/AMDGPU/SIRegisterInfo.td
index 7a928c423749..987a93040ec3 100644
--- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.td
@@ -578,7 +578,7 @@ def SReg_160 : RegisterClass<"AMDGPU", [v5i32, v5f32], 32,
let AllocationPriority = 16;
}
-def SGPR_256 : RegisterClass<"AMDGPU", [v8i32, v8f32], 32, (add SGPR_256Regs)> {
+def SGPR_256 : RegisterClass<"AMDGPU", [v8i32, v8f32, v4i64], 32, (add SGPR_256Regs)> {
let AllocationPriority = 17;
}
@@ -586,7 +586,7 @@ def TTMP_256 : RegisterClass<"AMDGPU", [v8i32, v8f32], 32, (add TTMP_256Regs)> {
let isAllocatable = 0;
}
-def SReg_256 : RegisterClass<"AMDGPU", [v8i32, v8f32], 32,
+def SReg_256 : RegisterClass<"AMDGPU", [v8i32, v8f32, v4i64], 32,
(add SGPR_256, TTMP_256)> {
// Requires 4 s_mov_b64 to copy
let CopyCost = 4;
diff --git a/llvm/lib/Target/AMDGPU/SMInstructions.td b/llvm/lib/Target/AMDGPU/SMInstructions.td
index 0e8e3f944f3d..ff778b6e5adc 100644
--- a/llvm/lib/Target/AMDGPU/SMInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SMInstructions.td
@@ -808,7 +808,9 @@ foreach vt = SReg_128.RegTypes in {
defm : SMRD_Pattern <"S_LOAD_DWORDX4", vt>;
}
-defm : SMRD_Pattern <"S_LOAD_DWORDX8", v8i32>;
+foreach vt = SReg_256.RegTypes in {
+defm : SMRD_Pattern <"S_LOAD_DWORDX8", vt>;
+}
defm : SMRD_Pattern <"S_LOAD_DWORDX16", v16i32>;
defm : SMLoad_Pattern <"S_BUFFER_LOAD_DWORD", i32>;
More information about the llvm-commits
mailing list