1// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefixes=GFX9 %s 2 3// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji %s 2>&1 | FileCheck -check-prefixes=ERR-SICIVI %s 4// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck -check-prefixes=ERR-SICIVI %s 5// FIXME: pre-gfx9 errors should be more useful 6 7 8v_add_u32 v1, v2, v3 9// GFX9: v_add_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x68] 10// ERR-SICIVI: error: instruction not supported on this GPU 11 12v_add_u32 v1, v2, s1 13// GFX9: v_add_u32_e64 v1, v2, s1 ; encoding: [0x01,0x00,0x34,0xd1,0x02,0x03,0x00,0x00] 14// ERR-SICIVI: error: instruction not supported on this GPU 15 16v_add_u32 v1, s1, v2 17// GFX9: v_add_u32_e32 v1, s1, v2 ; encoding: [0x01,0x04,0x02,0x68] 18// ERR-SICIVI: error: instruction not supported on this GPU 19 20v_add_u32 v1, 4.0, v2 21// GFX9: v_add_u32_e32 v1, 4.0, v2 ; encoding: [0xf6,0x04,0x02,0x68] 22// ERR-SICIVI: error: instruction not supported on this GPU 23 24v_add_u32 v1, v2, 4.0 25// GFX9: v_add_u32_e64 v1, v2, 4.0 ; encoding: [0x01,0x00,0x34,0xd1,0x02,0xed,0x01,0x00] 26// ERR-SICIVI: error: instruction not supported on this GPU 27 28v_add_u32_e32 v1, v2, v3 29// GFX9: v_add_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x68] 30// ERR-SICIVI: error: instruction not supported on this GPU 31 32v_add_u32_e32 v1, s1, v3 33// GFX9: v_add_u32_e32 v1, s1, v3 ; encoding: [0x01,0x06,0x02,0x68] 34// ERR-SICIVI: error: instruction not supported on this GPU 35 36 37 38v_sub_u32 v1, v2, v3 39// GFX9: v_sub_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6a] 40// ERR-SICIVI: error: instruction not supported on this GPU 41 42v_sub_u32 v1, v2, s1 43// GFX9: v_sub_u32_e64 v1, v2, s1 ; encoding: [0x01,0x00,0x35,0xd1,0x02,0x03,0x00,0x00] 44// ERR-SICIVI: error: instruction not supported on this GPU 45 46v_sub_u32 v1, s1, v2 47// GFX9: v_sub_u32_e32 v1, s1, v2 ; encoding: [0x01,0x04,0x02,0x6a] 48// ERR-SICIVI: error: instruction not supported on this GPU 49 50v_sub_u32 v1, 4.0, v2 51// GFX9: v_sub_u32_e32 v1, 4.0, v2 ; encoding: [0xf6,0x04,0x02,0x6a] 52// ERR-SICIVI: error: instruction not supported on this GPU 53 54v_sub_u32 v1, v2, 4.0 55// GFX9: v_sub_u32_e64 v1, v2, 4.0 ; encoding: [0x01,0x00,0x35,0xd1,0x02,0xed,0x01,0x00] 56// ERR-SICIVI: error: instruction not supported on this GPU 57 58v_sub_u32_e32 v1, v2, v3 59// GFX9: v_sub_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6a] 60// ERR-SICIVI: error: instruction not supported on this GPU 61 62v_sub_u32_e32 v1, s1, v3 63// GFX9: v_sub_u32_e32 v1, s1, v3 ; encoding: [0x01,0x06,0x02,0x6a] 64// ERR-SICIVI: error: instruction not supported on this GPU 65 66 67 68v_subrev_u32 v1, v2, v3 69// GFX9: v_subrev_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6c] 70// ERR-SICIVI: error: instruction not supported on this GPU 71 72v_subrev_u32 v1, v2, s1 73// GFX9: v_subrev_u32_e64 v1, v2, s1 ; encoding: [0x01,0x00,0x36,0xd1,0x02,0x03,0x00,0x00] 74// ERR-SICIVI: error: instruction not supported on this GPU 75 76v_subrev_u32 v1, s1, v2 77// GFX9: v_subrev_u32_e32 v1, s1, v2 ; encoding: [0x01,0x04,0x02,0x6c] 78// ERR-SICIVI: error: instruction not supported on this GPU 79 80v_subrev_u32 v1, 4.0, v2 81// GFX9: v_subrev_u32_e32 v1, 4.0, v2 ; encoding: [0xf6,0x04,0x02,0x6c] 82// ERR-SICIVI: error: instruction not supported on this GPU 83 84v_subrev_u32 v1, v2, 4.0 85// GFX9: v_subrev_u32_e64 v1, v2, 4.0 ; encoding: [0x01,0x00,0x36,0xd1,0x02,0xed,0x01,0x00] 86// ERR-SICIVI: error: instruction not supported on this GPU 87 88v_subrev_u32_e32 v1, v2, v3 89// GFX9: v_subrev_u32_e32 v1, v2, v3 ; encoding: [0x02,0x07,0x02,0x6c] 90// ERR-SICIVI: error: instruction not supported on this GPU 91 92v_subrev_u32_e32 v1, s1, v3 93// GFX9: v_subrev_u32_e32 v1, s1, v3 ; encoding: [0x01,0x06,0x02,0x6c] 94// ERR-SICIVI: error: instruction not supported on this GPU 95