R600: Use correct CF_END instruction on Northern Island GPUs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2013-04-29 22:23:58 +00:00
parent 015f586bc9
commit d8b2da1136
2 changed files with 6 additions and 3 deletions

View File

@ -123,7 +123,7 @@ private:
Opcode = isEg ? AMDGPU::POP_EG : AMDGPU::POP_R600;
break;
case CF_END:
if (ST.device()->getGeneration() == AMDGPUDeviceInfo::HD6XXX) {
if (ST.device()->getDeviceFlag() == OCL_DEVICE_CAYMAN) {
Opcode = AMDGPU::CF_END_CM;
break;
}

View File

@ -1,6 +1,9 @@
; RUN: llc < %s -march=r600 -mcpu=redwood --show-mc-encoding | FileCheck %s
; RUN: llc < %s -march=r600 -mcpu=redwood --show-mc-encoding | FileCheck --check-prefix=EG-CHECK %s
; RUN: llc < %s -march=r600 -mcpu=caicos --show-mc-encoding | FileCheck --check-prefix=EG-CHECK %s
; RUN: llc < %s -march=r600 -mcpu=cayman --show-mc-encoding | FileCheck --check-prefix=CM-CHECK %s
; CHECK: CF_END ; encoding: [0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80]
; EG-CHECK: CF_END ; encoding: [0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80]
; CM-CHECK: CF_END ; encoding: [0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88]
define void @eop() {
ret void
}