116 lines · plain
1// RUN: llvm-mc -triple=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck --check-prefix=GFX9 %s2 3// RUN: not llvm-mc -triple=amdgcn -mcpu=fiji %s 2>&1 | FileCheck --check-prefix=ERR-VI --implicit-check-not=error: %s4// RUN: not llvm-mc -triple=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck --check-prefix=ERR-SICI --implicit-check-not=error: %s5// FIXME: pre-gfx9 errors should be more useful6 7 8v_add_u32 v1, v2, v39// GFX9: v_add_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x68]10// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU11// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode12 13v_add_u32 v1, v2, s114// GFX9: v_add_u32_e64 v1, v2, s1 ; encoding: [0x01,0x00,0x34,0xd1,0x02,0x03,0x00,0x00]15// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU16// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode17 18v_add_u32 v1, s1, v219// GFX9: v_add_u32_e32 v1, s1, v2 ; encoding: [0x01,0x04,0x02,0x68]20// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU21// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode22 23v_add_u32 v1, 4.0, v224// GFX9: v_add_u32_e32 v1, 4.0, v2 ; encoding: [0xf6,0x04,0x02,0x68]25// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU26// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode27 28v_add_u32 v1, v2, 4.029// GFX9: v_add_u32_e64 v1, v2, 4.0 ; encoding: [0x01,0x00,0x34,0xd1,0x02,0xed,0x01,0x00]30// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU31// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode32 33v_add_u32_e32 v1, v2, v334// GFX9: v_add_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x68]35// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU36// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode37 38v_add_u32_e32 v1, s1, v339// GFX9: v_add_u32_e32 v1, s1, v3 ; encoding: [0x01,0x06,0x02,0x68]40// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU41// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode42 43 44 45v_sub_u32 v1, v2, v346// GFX9: v_sub_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6a]47// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU48// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode49 50v_sub_u32 v1, v2, s151// GFX9: v_sub_u32_e64 v1, v2, s1 ; encoding: [0x01,0x00,0x35,0xd1,0x02,0x03,0x00,0x00]52// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU53// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode54 55v_sub_u32 v1, s1, v256// GFX9: v_sub_u32_e32 v1, s1, v2 ; encoding: [0x01,0x04,0x02,0x6a]57// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU58// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode59 60v_sub_u32 v1, 4.0, v261// GFX9: v_sub_u32_e32 v1, 4.0, v2 ; encoding: [0xf6,0x04,0x02,0x6a]62// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU63// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode64 65v_sub_u32 v1, v2, 4.066// GFX9: v_sub_u32_e64 v1, v2, 4.0 ; encoding: [0x01,0x00,0x35,0xd1,0x02,0xed,0x01,0x00]67// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU68// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode69 70v_sub_u32_e32 v1, v2, v371// GFX9: v_sub_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6a]72// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU73// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode74 75v_sub_u32_e32 v1, s1, v376// GFX9: v_sub_u32_e32 v1, s1, v3 ; encoding: [0x01,0x06,0x02,0x6a]77// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU78// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode79 80 81 82v_subrev_u32 v1, v2, v383// GFX9: v_subrev_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6c]84// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU85// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode86 87v_subrev_u32 v1, v2, s188// GFX9: v_subrev_u32_e64 v1, v2, s1 ; encoding: [0x01,0x00,0x36,0xd1,0x02,0x03,0x00,0x00]89// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU90// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode91 92v_subrev_u32 v1, s1, v293// GFX9: v_subrev_u32_e32 v1, s1, v2 ; encoding: [0x01,0x04,0x02,0x6c]94// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU95// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode96 97v_subrev_u32 v1, 4.0, v298// GFX9: v_subrev_u32_e32 v1, 4.0, v2 ; encoding: [0xf6,0x04,0x02,0x6c]99// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU100// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode101 102v_subrev_u32 v1, v2, 4.0103// GFX9: v_subrev_u32_e64 v1, v2, 4.0 ; encoding: [0x01,0x00,0x36,0xd1,0x02,0xed,0x01,0x00]104// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU105// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode106 107v_subrev_u32_e32 v1, v2, v3108// GFX9: v_subrev_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6c]109// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU110// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode111 112v_subrev_u32_e32 v1, s1, v3113// GFX9: v_subrev_u32_e32 v1, s1, v3 ; encoding: [0x01,0x06,0x02,0x6c]114// ERR-SICI: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU115// ERR-VI: :[[@LINE-3]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode116