[AMDGPU] Improve error checking in gfx10 assembler tests
authorJay Foad <jay.foad@amd.com>
Mon, 13 Jan 2020 13:39:52 +0000 (13:39 +0000)
committerJay Foad <jay.foad@amd.com>
Tue, 14 Jan 2020 08:20:50 +0000 (08:20 +0000)
commit0950de264e37264b9f767a898bd839d9fcb7328f
tree3281a35b59d3cebc39c4e4d276b9623f78549b6a
parent63c3691f79179db9a16f260f1cf81475fdfef060
[AMDGPU] Improve error checking in gfx10 assembler tests

Summary:
This adds checks that the expected error was actually reported against
the correct instruction, and fixes a couple of problems that that showed
up: one incorrect W32-ERR:

 v_cmp_class_f16_sdwa vcc, v1, v2 src0_sel:DWORD src1_sel:DWORD
 // W64: encoding: [0xf9,0x04,0x1e,0x7d,0x01,0x00,0x06,0x06]
-// W32-ERR: error: invalid operand for instruction
+// W32-ERR: error: {{instruction not supported on this GPU|invalid operand for instruction}}

and one missing W32-ERR:

 v_cmp_class_f16_sdwa s[6:7], v1, v2 src0_sel:DWORD src1_sel:DWORD
 // W64: encoding: [0xf9,0x04,0x1e,0x7d,0x01,0x86,0x06,0x06]
+// W32-ERR: error: invalid operand for instruction

Reviewers: rampitec, arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72611
llvm/test/MC/AMDGPU/gfx10_asm_all.s