Skip to content

Commit

Permalink
[AMDGPU][mc] Improve test of special asm symbols.
Browse files Browse the repository at this point in the history
Test simplified. Coverage extended.

Differential Revision: https://reviews.llvm.org/D26198

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285844 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
atamazov committed Nov 2, 2016
1 parent 74a715d commit 714be8b
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions test/MC/AMDGPU/symbol_special.s
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
// RUN: llvm-mc -arch=amdgcn -mcpu=SI %s | FileCheck %s --check-prefix=SI
// RUN: llvm-mc -arch=amdgcn -mcpu=bonaire %s | FileCheck %s --check-prefix=BONAIRE
// RUN: llvm-mc -arch=amdgcn -mcpu=hawaii %s | FileCheck %s --check-prefix=HAWAII
// RUN: llvm-mc -arch=amdgcn -mcpu=kabini %s | FileCheck %s --check-prefix=KABINI
// RUN: llvm-mc -arch=amdgcn -mcpu=iceland %s | FileCheck %s --check-prefix=ICELAND
// RUN: llvm-mc -arch=amdgcn -mcpu=carrizo %s | FileCheck %s --check-prefix=CARRIZO
// RUN: llvm-mc -arch=amdgcn -mcpu=tonga %s | FileCheck %s --check-prefix=TONGA
// RUN: llvm-mc -arch=amdgcn -mcpu=fiji %s | FileCheck %s --check-prefix=FIJI
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx804 %s | FileCheck %s --check-prefix=GFX804
// RUN: llvm-mc -arch=amdgcn -mcpu=stoney %s | FileCheck %s --check-prefix=STONEY

.if .option.machine_version_major == 0
.byte 0
.elseif .option.machine_version_major == 7
.byte 7
.elseif .option.machine_version_major == 8
.byte 8
.else
.error "major unknown"
.endif
.byte .option.machine_version_major
// SI: .byte 0
// BONAIRE: .byte 7
// HAWAII: .byte 7
// KABINI: .byte 7
// ICELAND: .byte 8
// CARRIZO: .byte 8
// TONGA: .byte 8
// FIJI: .byte 8
// GFX804: .byte 8
// STONEY: .byte 8

.if .option.machine_version_minor == 0
.byte 0
.else
.error "minor unknown"
.endif
.byte .option.machine_version_minor
// SI: .byte 0
// BONAIRE: .byte 0
// HAWAII: .byte 0
// KABINI: .byte 0
// ICELAND: .byte 0
// CARRIZO: .byte 0
// TONGA: .byte 0
// FIJI: .byte 0
// GFX804: .byte 0
// STONEY: .byte 1

.if .option.machine_version_stepping == 0
.byte 0
.elseif .option.machine_version_stepping == 1
.byte 1
.elseif .option.machine_version_stepping == 2
.byte 2
.elseif .option.machine_version_stepping == 3
.byte 3
.else
.error "stepping unknown"
.endif
.byte .option.machine_version_stepping
// SI: .byte 0
// BONAIRE: .byte 0
// HAWAII: .byte 1
// KABINI: .byte 2
// ICELAND: .byte 0
// CARRIZO: .byte 1
// TONGA: .byte 2
// FIJI: .byte 3

v_add_f32 v0, v0, v[.option.machine_version_major]
// BONAIRE: v_add_f32_e32 v0, v0, v7
// HAWAII: v_add_f32_e32 v0, v0, v7
// TONGA: v_add_f32_e32 v0, v0, v8
// FIJI: v_add_f32_e32 v0, v0, v8
// GFX804: .byte 4
// STONEY: .byte 0

0 comments on commit 714be8b

Please sign in to comment.