From 2a4d3e7e873d4c62a4b751ac9f96a3d787c8ee9c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 5 Apr 2013 23:31:35 +0000 Subject: [PATCH] R600/SI: Add processor types for each SI variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Christian König git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178928 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/AMDILDeviceInfo.cpp | 4 +++- lib/Target/R600/Processors.td | 7 +++++-- test/CodeGen/R600/imm.ll | 2 +- test/CodeGen/R600/llvm.SI.fs.interp.constant.ll | 2 +- test/CodeGen/R600/llvm.SI.sample.ll | 2 +- test/CodeGen/R600/lshl.ll | 2 +- test/CodeGen/R600/lshr.ll | 2 +- test/CodeGen/R600/mulhu.ll | 2 +- test/CodeGen/R600/seto.ll | 2 +- test/CodeGen/R600/setuo.ll | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/Target/R600/AMDILDeviceInfo.cpp b/lib/Target/R600/AMDILDeviceInfo.cpp index 9605fbe6334..19792b73e2d 100644 --- a/lib/Target/R600/AMDILDeviceInfo.cpp +++ b/lib/Target/R600/AMDILDeviceInfo.cpp @@ -79,7 +79,9 @@ AMDGPUDevice* getDeviceFromName(const std::string &deviceName, " on 32bit pointers!"); #endif return new AMDGPUNIDevice(ptr); - } else if (deviceName == "SI") { + } else if (deviceName == "SI" || + deviceName == "tahiti" || deviceName == "pitcairn" || + deviceName == "verde" || deviceName == "oland") { return new AMDGPUSIDevice(ptr); } else { #if DEBUG diff --git a/lib/Target/R600/Processors.td b/lib/Target/R600/Processors.td index 868810c613b..3034c798826 100644 --- a/lib/Target/R600/Processors.td +++ b/lib/Target/R600/Processors.td @@ -26,5 +26,8 @@ def : Proc<"barts", R600_EG_Itin, [FeatureByteAddress, FeatureImages]>; def : Proc<"turks", R600_EG_Itin, [FeatureByteAddress, FeatureImages]>; def : Proc<"caicos", R600_EG_Itin, [FeatureByteAddress, FeatureImages]>; def : Proc<"cayman", R600_EG_Itin, [FeatureByteAddress, FeatureImages, FeatureFP64]>; -def : Proc<"SI", SI_Itin, [Feature64BitPtr]>; - +def : Proc<"SI", SI_Itin, [Feature64BitPtr, FeatureFP64]>; +def : Proc<"tahiti", SI_Itin, [Feature64BitPtr, FeatureFP64]>; +def : Proc<"pitcairn", SI_Itin, [Feature64BitPtr, FeatureFP64]>; +def : Proc<"verde", SI_Itin, [Feature64BitPtr, FeatureFP64]>; +def : Proc<"oland", SI_Itin, [Feature64BitPtr, FeatureFP64]>; diff --git a/test/CodeGen/R600/imm.ll b/test/CodeGen/R600/imm.ll index b43f91722e2..02b73096ce3 100644 --- a/test/CodeGen/R600/imm.ll +++ b/test/CodeGen/R600/imm.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +; RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ; XXX: Enable once SI supports buffer stores ; XFAIL: * diff --git a/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll b/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll index bf0cdaa2fa3..e45722c3fa6 100644 --- a/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll +++ b/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: S_MOV_B32 ;CHECK-NEXT: V_INTERP_MOV_F32 diff --git a/test/CodeGen/R600/llvm.SI.sample.ll b/test/CodeGen/R600/llvm.SI.sample.ll index c724395b98c..5bdb246a37f 100644 --- a/test/CodeGen/R600/llvm.SI.sample.ll +++ b/test/CodeGen/R600/llvm.SI.sample.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: IMAGE_SAMPLE ;CHECK: IMAGE_SAMPLE diff --git a/test/CodeGen/R600/lshl.ll b/test/CodeGen/R600/lshl.ll index 423adb9da90..fb698da6271 100644 --- a/test/CodeGen/R600/lshl.ll +++ b/test/CodeGen/R600/lshl.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: V_LSHLREV_B32_e32 VGPR0, 1, VGPR0 diff --git a/test/CodeGen/R600/lshr.ll b/test/CodeGen/R600/lshr.ll index 551eac1d76b..e0ed3ac0786 100644 --- a/test/CodeGen/R600/lshr.ll +++ b/test/CodeGen/R600/lshr.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: V_LSHRREV_B32_e32 VGPR0, 1, VGPR0 diff --git a/test/CodeGen/R600/mulhu.ll b/test/CodeGen/R600/mulhu.ll index 28744e00c3c..bc17a597873 100644 --- a/test/CodeGen/R600/mulhu.ll +++ b/test/CodeGen/R600/mulhu.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: V_MOV_B32_e32 VGPR1, -1431655765 ;CHECK-NEXT: V_MUL_HI_U32 VGPR0, VGPR0, VGPR1, 0, 0, 0, 0, 0 diff --git a/test/CodeGen/R600/seto.ll b/test/CodeGen/R600/seto.ll index 5ab4b87d570..4622203ffdb 100644 --- a/test/CodeGen/R600/seto.ll +++ b/test/CodeGen/R600/seto.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: V_CMP_O_F32_e64 SGPR0_SGPR1, VGPR0, VGPR0, 0, 0, 0, 0 diff --git a/test/CodeGen/R600/setuo.ll b/test/CodeGen/R600/setuo.ll index 320835576d4..0bf5801b1c3 100644 --- a/test/CodeGen/R600/setuo.ll +++ b/test/CodeGen/R600/setuo.ll @@ -1,4 +1,4 @@ -;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s +;RUN: llc < %s -march=r600 -mcpu=verde | FileCheck %s ;CHECK: V_CMP_U_F32_e64 SGPR0_SGPR1, VGPR0, VGPR0, 0, 0, 0, 0