summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Kolton <Sam.Kolton@amd.com>2016-07-06 12:52:20 +0000
committerSam Kolton <Sam.Kolton@amd.com>2016-07-06 12:52:20 +0000
commit3c21a6907712ee6f47dba155acf0c51e3c5800b6 (patch)
tree3085a08ac6f33a6bd0527a9dda19047b6a9f3695
parent1f6929bff6a363bd9f920bdbb8bee3b15f1d72e5 (diff)
downloadbcm5719-llvm-3c21a6907712ee6f47dba155acf0c51e3c5800b6.tar.gz
bcm5719-llvm-3c21a6907712ee6f47dba155acf0c51e3c5800b6.zip
[AMDGPU] Assembler: regression tests for bug 28413. NFC
llvm-svn: 274623
-rw-r--r--llvm/test/MC/AMDGPU/regression/bug28413.s34
-rw-r--r--llvm/test/MC/AMDGPU/regression/lit.local.cfg2
-rw-r--r--llvm/test/MC/AMDGPU/vop1.s10
3 files changed, 36 insertions, 10 deletions
diff --git a/llvm/test/MC/AMDGPU/regression/bug28413.s b/llvm/test/MC/AMDGPU/regression/bug28413.s
new file mode 100644
index 00000000000..d5b2ff90cd9
--- /dev/null
+++ b/llvm/test/MC/AMDGPU/regression/bug28413.s
@@ -0,0 +1,34 @@
+// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SI --check-prefix=SICI
+// RUN: llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SI --check-prefix=SICI
+// RUN: llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SICI --check-prefix=CIVI
+// RUN: llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=CIVI --check-prefix=VI
+
+v_cmp_eq_i32 vcc, 0.5, v0
+// SICI: v_cmp_eq_i32_e32 vcc, 0.5, v0 ; encoding: [0xf0,0x00,0x04,0x7d]
+// VI: v_cmp_eq_i32_e32 vcc, 0.5, v0 ; encoding: [0xf0,0x00,0x84,0x7d]
+
+v_cmpx_eq_u32_e64 s[0:1], -4.0, s0
+// SICI: v_cmpx_eq_u32_e64 s[0:1], -4.0, s0 ; encoding: [0x00,0x00,0xa4,0xd1,0xf7,0x00,0x00,0x00]
+// VI: v_cmpx_eq_u32_e64 s[0:1], -4.0, s0 ; encoding: [0x00,0x00,0xda,0xd0,0xf7,0x00,0x00,0x00]
+
+v_cmp_eq_i32 vcc, 3.125, v0
+// SICI: v_cmp_eq_i32_e32 vcc, 0x40480000, v0 ; encoding: [0xff,0x00,0x04,0x7d,0x00,0x00,0x48,0x40]
+// VI: v_cmp_eq_i32_e32 vcc, 0x40480000, v0 ; encoding: [0xff,0x00,0x84,0x7d,0x00,0x00,0x48,0x40]
+
+v_cmpx_eq_u32 vcc, 3.125, v0
+// SICI: v_cmpx_eq_u32_e32 vcc, 0x40480000, v0 ; encoding: [0xff,0x00,0xa4,0x7d,0x00,0x00,0x48,0x40]
+// VI: v_cmpx_eq_u32_e32 vcc, 0x40480000, v0 ; encoding: [0xff,0x00,0xb4,0x7d,0x00,0x00,0x48,0x40]
+
+v_mov_b32 v0, 0.5
+// GCN: v_mov_b32_e32 v0, 0.5 ; encoding: [0xf0,0x02,0x00,0x7e]
+
+v_mov_b32 v0, 3.125
+// GCN: v_mov_b32_e32 v0, 0x40480000 ; encoding: [0xff,0x02,0x00,0x7e,0x00,0x00,0x48,0x40]
+
+v_add_i32 v0, vcc, 0.5, v0
+// SICI: v_add_i32_e32 v0, vcc, 0.5, v0 ; encoding: [0xf0,0x00,0x00,0x4a]
+// VI: v_add_i32_e32 v0, vcc, 0.5, v0 ; encoding: [0xf0,0x00,0x00,0x32]
+
+v_add_i32 v0, vcc, 3.125, v0
+// SICI: v_add_i32_e32 v0, vcc, 0x40480000, v0 ; encoding: [0xff,0x00,0x00,0x4a,0x00,0x00,0x48,0x40]
+// VI: v_add_i32_e32 v0, vcc, 0x40480000, v0 ; encoding: [0xff,0x00,0x00,0x32,0x00,0x00,0x48,0x40] \ No newline at end of file
diff --git a/llvm/test/MC/AMDGPU/regression/lit.local.cfg b/llvm/test/MC/AMDGPU/regression/lit.local.cfg
new file mode 100644
index 00000000000..2a665f06be7
--- /dev/null
+++ b/llvm/test/MC/AMDGPU/regression/lit.local.cfg
@@ -0,0 +1,2 @@
+if not 'AMDGPU' in config.root.targets:
+ config.unsupported = True
diff --git a/llvm/test/MC/AMDGPU/vop1.s b/llvm/test/MC/AMDGPU/vop1.s
index e82206a7ada..22a4f91afef 100644
--- a/llvm/test/MC/AMDGPU/vop1.s
+++ b/llvm/test/MC/AMDGPU/vop1.s
@@ -374,13 +374,3 @@ v_sin_f16 v1, v2
// NOSICI: v_cos_f16 v1, v2
// VI: v_cos_f16_e32 v1, v2 ; encoding: [0x02,0x95,0x02,0x7e]
v_cos_f16 v1, v2
-
-//===----------------------------------------------------------------------===//
-// Floating point literals
-//===----------------------------------------------------------------------===//
-
-// GCN: v_mov_b32_e32 v0, 0.5 ; encoding: [0xf0,0x02,0x00,0x7e]
-v_mov_b32 v0, 0.5
-
-// GCN: v_mov_b32_e32 v0, 0x40480000 ; encoding: [0xff,0x02,0x00,0x7e,0x00,0x00,0x48,0x40]
-v_mov_b32 v0, 3.125 \ No newline at end of file
OpenPOWER on IntegriCloud