1// RUN: not llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=SICI 2// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck %s --check-prefix=SICI 3// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck %s --check-prefixes=SICI,CI 4// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck %s --check-prefix=GFX89 5// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck %s --check-prefixes=GFX89,GFX9 6 7// RUN: not llvm-mc -arch=amdgcn %s 2>&1 | FileCheck %s --check-prefixes=NOGCN,NOSI,NOSICI,NOSICIVI --implicit-check-not=error: 8// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck %s --check-prefixes=NOGCN,NOSI,NOSICI,NOSICIVI --implicit-check-not=error: 9// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck %s --check-prefixes=NOGCN,NOSICI,NOCIVI,NOSICIVI --implicit-check-not=error: 10// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck %s --check-prefixes=NOGCN,NOSICIVI,NOVI,NOGFX89 --implicit-check-not=error: 11// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck %s --check-prefixes=NOGCN,NOGFX89,NOGFX9 --implicit-check-not=error: 12 13//---------------------------------------------------------------------------// 14// fp literal, expected fp operand 15//---------------------------------------------------------------------------// 16 17// SICI: v_fract_f64_e32 v[0:1], 0.5 ; encoding: [0xf0,0x7c,0x00,0x7e] 18// GFX89: v_fract_f64_e32 v[0:1], 0.5 ; encoding: [0xf0,0x64,0x00,0x7e] 19v_fract_f64 v[0:1], 0.5 20 21// SICI: v_sqrt_f64_e32 v[0:1], -4.0 ; encoding: [0xf7,0x68,0x00,0x7e] 22// GFX89: v_sqrt_f64_e32 v[0:1], -4.0 ; encoding: [0xf7,0x50,0x00,0x7e] 23v_sqrt_f64 v[0:1], -4.0 24 25// SICI: v_log_clamp_f32_e32 v1, 0.5 ; encoding: [0xf0,0x4c,0x02,0x7e] 26// NOGFX89: error: instruction not supported on this GPU 27v_log_clamp_f32 v1, 0.5 28 29// SICI: v_fract_f64_e32 v[0:1], 0.5 ; encoding: [0xf0,0x7c,0x00,0x7e] 30// GFX89: v_fract_f64_e32 v[0:1], 0.5 ; encoding: [0xf0,0x64,0x00,0x7e] 31v_fract_f64 v[0:1], 0.5 32 33// SICI: v_trunc_f32_e32 v0, 0.5 ; encoding: [0xf0,0x42,0x00,0x7e] 34// GFX89: v_trunc_f32_e32 v0, 0.5 ; encoding: [0xf0,0x38,0x00,0x7e] 35v_trunc_f32 v0, 0.5 36 37// SICI: v_fract_f64_e32 v[0:1], -1.0 ; encoding: [0xf3,0x7c,0x00,0x7e] 38// GFX89: v_fract_f64_e32 v[0:1], -1.0 ; encoding: [0xf3,0x64,0x00,0x7e] 39v_fract_f64 v[0:1], -1.0 40 41// SICI: v_trunc_f32_e32 v0, -1.0 ; encoding: [0xf3,0x42,0x00,0x7e] 42// GFX89: v_trunc_f32_e32 v0, -1.0 ; encoding: [0xf3,0x38,0x00,0x7e] 43v_trunc_f32 v0, -1.0 44 45// SICI: v_fract_f64_e32 v[0:1], 4.0 ; encoding: [0xf6,0x7c,0x00,0x7e] 46// GFX89: v_fract_f64_e32 v[0:1], 4.0 ; encoding: [0xf6,0x64,0x00,0x7e] 47v_fract_f64 v[0:1], 4.0 48 49// SICI: v_trunc_f32_e32 v0, 4.0 ; encoding: [0xf6,0x42,0x00,0x7e] 50// GFX89: v_trunc_f32_e32 v0, 4.0 ; encoding: [0xf6,0x38,0x00,0x7e] 51v_trunc_f32 v0, 4.0 52 53// SICI: v_fract_f64_e32 v[0:1], 0 ; encoding: [0x80,0x7c,0x00,0x7e] 54// GFX89: v_fract_f64_e32 v[0:1], 0 ; encoding: [0x80,0x64,0x00,0x7e] 55v_fract_f64 v[0:1], 0.0 56 57// SICI: v_trunc_f32_e32 v0, 0 ; encoding: [0x80,0x42,0x00,0x7e] 58// GFX89: v_trunc_f32_e32 v0, 0 ; encoding: [0x80,0x38,0x00,0x7e] 59v_trunc_f32 v0, 0.0 60 61// SICI: v_fract_f64_e32 v[0:1], 0x3ff80000 ; encoding: [0xff,0x7c,0x00,0x7e,0x00,0x00,0xf8,0x3f] 62// GFX89: v_fract_f64_e32 v[0:1], 0x3ff80000 ; encoding: [0xff,0x64,0x00,0x7e,0x00,0x00,0xf8,0x3f] 63v_fract_f64 v[0:1], 1.5 64 65// SICI: v_trunc_f32_e32 v0, 0x3fc00000 ; encoding: [0xff,0x42,0x00,0x7e,0x00,0x00,0xc0,0x3f] 66// GFX89: v_trunc_f32_e32 v0, 0x3fc00000 ; encoding: [0xff,0x38,0x00,0x7e,0x00,0x00,0xc0,0x3f] 67v_trunc_f32 v0, 1.5 68 69// SICI: v_fract_f64_e32 v[0:1], 0xc00921ca ; encoding: [0xff,0x7c,0x00,0x7e,0xca,0x21,0x09,0xc0] 70// GFX89: v_fract_f64_e32 v[0:1], 0xc00921ca ; encoding: [0xff,0x64,0x00,0x7e,0xca,0x21,0x09,0xc0] 71v_fract_f64 v[0:1], -3.1415 72 73// SICI: v_trunc_f32_e32 v0, 0xc0490e56 ; encoding: [0xff,0x42,0x00,0x7e,0x56,0x0e,0x49,0xc0] 74// GFX89: v_trunc_f32_e32 v0, 0xc0490e56 ; encoding: [0xff,0x38,0x00,0x7e,0x56,0x0e,0x49,0xc0] 75v_trunc_f32 v0, -3.1415 76 77// SICI: v_fract_f64_e32 v[0:1], 0x44b52d02 ; encoding: [0xff,0x7c,0x00,0x7e,0x02,0x2d,0xb5,0x44] 78// GFX89: v_fract_f64_e32 v[0:1], 0x44b52d02 ; encoding: [0xff,0x64,0x00,0x7e,0x02,0x2d,0xb5,0x44] 79v_fract_f64 v[0:1], 100000000000000000000000.0 80 81// SICI: v_trunc_f32_e32 v0, 0x65a96816 ; encoding: [0xff,0x42,0x00,0x7e,0x16,0x68,0xa9,0x65] 82// GFX89: v_trunc_f32_e32 v0, 0x65a96816 ; encoding: [0xff,0x38,0x00,0x7e,0x16,0x68,0xa9,0x65] 83v_trunc_f32 v0, 100000000000000000000000.0 84 85// SICI: v_fract_f64_e32 v[0:1], 0x416312d0 ; encoding: [0xff,0x7c,0x00,0x7e,0xd0,0x12,0x63,0x41] 86// GFX89: v_fract_f64_e32 v[0:1], 0x416312d0 ; encoding: [0xff,0x64,0x00,0x7e,0xd0,0x12,0x63,0x41] 87v_fract_f64 v[0:1], 10000000.0 88 89// SICI: v_trunc_f32_e32 v0, 0x4b189680 ; encoding: [0xff,0x42,0x00,0x7e,0x80,0x96,0x18,0x4b] 90// GFX89: v_trunc_f32_e32 v0, 0x4b189680 ; encoding: [0xff,0x38,0x00,0x7e,0x80,0x96,0x18,0x4b] 91v_trunc_f32 v0, 10000000.0 92 93// SICI: v_fract_f64_e32 v[0:1], 0x47efffff ; encoding: [0xff,0x7c,0x00,0x7e,0xff,0xff,0xef,0x47] 94// GFX89: v_fract_f64_e32 v[0:1], 0x47efffff ; encoding: [0xff,0x64,0x00,0x7e,0xff,0xff,0xef,0x47] 95v_fract_f64 v[0:1], 3.402823e+38 96 97// SICI: v_trunc_f32_e32 v0, 0x7f7ffffd ; encoding: [0xff,0x42,0x00,0x7e,0xfd,0xff,0x7f,0x7f] 98// GFX89: v_trunc_f32_e32 v0, 0x7f7ffffd ; encoding: [0xff,0x38,0x00,0x7e,0xfd,0xff,0x7f,0x7f] 99v_trunc_f32 v0, 3.402823e+38 100 101// SICI: v_fract_f64_e32 v[0:1], 0x381fffff ; encoding: [0xff,0x7c,0x00,0x7e,0xff,0xff,0x1f,0x38] 102// GFX89: v_fract_f64_e32 v[0:1], 0x381fffff ; encoding: [0xff,0x64,0x00,0x7e,0xff,0xff,0x1f,0x38] 103v_fract_f64 v[0:1], 2.3509886e-38 104 105// SICI: v_trunc_f32_e32 v0, 0xffffff ; encoding: [0xff,0x42,0x00,0x7e,0xff,0xff,0xff,0x00] 106// GFX89: v_trunc_f32_e32 v0, 0xffffff ; encoding: [0xff,0x38,0x00,0x7e,0xff,0xff,0xff,0x00] 107v_trunc_f32 v0, 2.3509886e-38 108 109// SICI: v_fract_f64_e32 v[0:1], 0x3179f623 ; encoding: [0xff,0x7c,0x00,0x7e,0x23,0xf6,0x79,0x31] 110// GFX89: v_fract_f64_e32 v[0:1], 0x3179f623 ; encoding: [0xff,0x64,0x00,0x7e,0x23,0xf6,0x79,0x31] 111v_fract_f64 v[0:1], 2.3509886e-70 112 113// NOSICI: error: invalid operand for instruction 114// NOGFX89: error: invalid operand for instruction 115v_trunc_f32 v0, 2.3509886e-70 116 117//---------------------------------------------------------------------------// 118// fp literal, expected int operand 119//---------------------------------------------------------------------------// 120 121// SICI: s_mov_b64 s[0:1], 0.5 ; encoding: [0xf0,0x04,0x80,0xbe] 122// GFX89: s_mov_b64 s[0:1], 0.5 ; encoding: [0xf0,0x01,0x80,0xbe] 123s_mov_b64_e32 s[0:1], 0.5 124 125// SICI: v_and_b32_e32 v0, 0.5, v1 ; encoding: [0xf0,0x02,0x00,0x36] 126// GFX89: v_and_b32_e32 v0, 0.5, v1 ; encoding: [0xf0,0x02,0x00,0x26] 127v_and_b32_e32 v0, 0.5, v1 128 129// SICI: v_and_b32_e64 v0, 0.5, v1 ; encoding: [0x00,0x00,0x36,0xd2,0xf0,0x02,0x02,0x00] 130// GFX89: v_and_b32_e64 v0, 0.5, v1 ; encoding: [0x00,0x00,0x13,0xd1,0xf0,0x02,0x02,0x00] 131v_and_b32_e64 v0, 0.5, v1 132 133// SICI: s_mov_b64 s[0:1], -1.0 ; encoding: [0xf3,0x04,0x80,0xbe] 134// GFX89: s_mov_b64 s[0:1], -1.0 ; encoding: [0xf3,0x01,0x80,0xbe] 135s_mov_b64_e32 s[0:1], -1.0 136 137// SICI: v_and_b32_e32 v0, -1.0, v1 ; encoding: [0xf3,0x02,0x00,0x36] 138// GFX89: v_and_b32_e32 v0, -1.0, v1 ; encoding: [0xf3,0x02,0x00,0x26] 139v_and_b32_e32 v0, -1.0, v1 140 141// SICI: v_and_b32_e64 v0, -1.0, v1 ; encoding: [0x00,0x00,0x36,0xd2,0xf3,0x02,0x02,0x00] 142// GFX89: v_and_b32_e64 v0, -1.0, v1 ; encoding: [0x00,0x00,0x13,0xd1,0xf3,0x02,0x02,0x00] 143v_and_b32_e64 v0, -1.0, v1 144 145// SICI: s_mov_b64 s[0:1], 4.0 ; encoding: [0xf6,0x04,0x80,0xbe] 146// GFX89: s_mov_b64 s[0:1], 4.0 ; encoding: [0xf6,0x01,0x80,0xbe] 147s_mov_b64_e32 s[0:1], 4.0 148 149// SICI: v_and_b32_e32 v0, 4.0, v1 ; encoding: [0xf6,0x02,0x00,0x36] 150// GFX89: v_and_b32_e32 v0, 4.0, v1 ; encoding: [0xf6,0x02,0x00,0x26] 151v_and_b32_e32 v0, 4.0, v1 152 153// SICI: v_and_b32_e64 v0, 4.0, v1 ; encoding: [0x00,0x00,0x36,0xd2,0xf6,0x02,0x02,0x00] 154// GFX89: v_and_b32_e64 v0, 4.0, v1 ; encoding: [0x00,0x00,0x13,0xd1,0xf6,0x02,0x02,0x00] 155v_and_b32_e64 v0, 4.0, v1 156 157// SICI: s_mov_b64 s[0:1], 0 ; encoding: [0x80,0x04,0x80,0xbe] 158// GFX89: s_mov_b64 s[0:1], 0 ; encoding: [0x80,0x01,0x80,0xbe] 159s_mov_b64_e32 s[0:1], 0.0 160 161// SICI: v_and_b32_e32 v0, 0, v1 ; encoding: [0x80,0x02,0x00,0x36] 162// GFX89: v_and_b32_e32 v0, 0, v1 ; encoding: [0x80,0x02,0x00,0x26] 163v_and_b32_e32 v0, 0.0, v1 164 165// SICI: v_and_b32_e64 v0, 0, v1 ; encoding: [0x00,0x00,0x36,0xd2,0x80,0x02,0x02,0x00] 166// GFX89: v_and_b32_e64 v0, 0, v1 ; encoding: [0x00,0x00,0x13,0xd1,0x80,0x02,0x02,0x00] 167v_and_b32_e64 v0, 0.0, v1 168 169// NOSICI: error: invalid operand for instruction 170// NOGFX89: error: invalid operand for instruction 171s_mov_b64_e32 s[0:1], 1.5 172 173// SICI: v_and_b32_e32 v0, 0x3fc00000, v1 ; encoding: [0xff,0x02,0x00,0x36,0x00,0x00,0xc0,0x3f] 174// GFX89: v_and_b32_e32 v0, 0x3fc00000, v1 ; encoding: [0xff,0x02,0x00,0x26,0x00,0x00,0xc0,0x3f] 175v_and_b32_e32 v0, 1.5, v1 176 177// NOSICI: error: invalid operand for instruction 178// NOGFX89: error: invalid operand for instruction 179s_mov_b64_e32 s[0:1], -3.1415 180 181// SICI: v_and_b32_e32 v0, 0xc0490e56, v1 ; encoding: [0xff,0x02,0x00,0x36,0x56,0x0e,0x49,0xc0] 182// GFX89: v_and_b32_e32 v0, 0xc0490e56, v1 ; encoding: [0xff,0x02,0x00,0x26,0x56,0x0e,0x49,0xc0] 183v_and_b32_e32 v0, -3.1415, v1 184 185// NOSICI: error: invalid operand for instruction 186// NOGFX89: error: invalid operand for instruction 187s_mov_b64_e32 s[0:1], 100000000000000000000000.0 188 189// SICI: v_and_b32_e32 v0, 0x65a96816, v1 ; encoding: [0xff,0x02,0x00,0x36,0x16,0x68,0xa9,0x65] 190// GFX89: v_and_b32_e32 v0, 0x65a96816, v1 ; encoding: [0xff,0x02,0x00,0x26,0x16,0x68,0xa9,0x65] 191v_and_b32_e32 v0, 100000000000000000000000.0, v1 192 193// NOSICI: error: invalid operand for instruction 194// NOGFX89: error: invalid operand for instruction 195s_mov_b64_e32 s[0:1], 10000000.0 196 197// SICI: v_and_b32_e32 v0, 0x4b189680, v1 ; encoding: [0xff,0x02,0x00,0x36,0x80,0x96,0x18,0x4b] 198// GFX89: v_and_b32_e32 v0, 0x4b189680, v1 ; encoding: [0xff,0x02,0x00,0x26,0x80,0x96,0x18,0x4b] 199v_and_b32_e32 v0, 10000000.0, v1 200 201// NOSICI: error: invalid operand for instruction 202// NOGFX89: error: invalid operand for instruction 203s_mov_b64_e32 s[0:1], 3.402823e+38 204 205// SICI: v_and_b32_e32 v0, 0x7f7ffffd, v1 ; encoding: [0xff,0x02,0x00,0x36,0xfd,0xff,0x7f,0x7f] 206// GFX89: v_and_b32_e32 v0, 0x7f7ffffd, v1 ; encoding: [0xff,0x02,0x00,0x26,0xfd,0xff,0x7f,0x7f] 207v_and_b32_e32 v0, 3.402823e+38, v1 208 209// NOSICI: error: invalid operand for instruction 210// NOGFX89: error: invalid operand for instruction 211s_mov_b64_e32 s[0:1], 2.3509886e-38 212 213// SICI: v_and_b32_e32 v0, 0xffffff, v1 ; encoding: [0xff,0x02,0x00,0x36,0xff,0xff,0xff,0x00] 214// GFX89: v_and_b32_e32 v0, 0xffffff, v1 ; encoding: [0xff,0x02,0x00,0x26,0xff,0xff,0xff,0x00] 215v_and_b32_e32 v0, 2.3509886e-38, v1 216 217// NOSICI: error: invalid operand for instruction 218// NOGFX89: error: invalid operand for instruction 219s_mov_b64_e32 s[0:1], 2.3509886e-70 220 221// NOSICI: error: invalid operand for instruction 222// NOGFX89: error: invalid operand for instruction 223v_and_b32_e32 v0, 2.3509886e-70, v1 224 225//---------------------------------------------------------------------------// 226// int literal, expected fp operand 227//---------------------------------------------------------------------------// 228 229// SICI: v_trunc_f32_e32 v0, 0 ; encoding: [0x80,0x42,0x00,0x7e] 230// GFX89: v_trunc_f32_e32 v0, 0 ; encoding: [0x80,0x38,0x00,0x7e] 231v_trunc_f32_e32 v0, 0 232 233// SICI: v_fract_f64_e32 v[0:1], 0 ; encoding: [0x80,0x7c,0x00,0x7e] 234// GFX89: v_fract_f64_e32 v[0:1], 0 ; encoding: [0x80,0x64,0x00,0x7e] 235v_fract_f64_e32 v[0:1], 0 236 237// SICI: v_trunc_f32_e64 v0, 0 ; encoding: [0x00,0x00,0x42,0xd3,0x80,0x00,0x00,0x00] 238// GFX89: v_trunc_f32_e64 v0, 0 ; encoding: [0x00,0x00,0x5c,0xd1,0x80,0x00,0x00,0x00] 239v_trunc_f32_e64 v0, 0 240 241// SICI: v_fract_f64_e64 v[0:1], 0 ; encoding: [0x00,0x00,0x7c,0xd3,0x80,0x00,0x00,0x00] 242// GFX89: v_fract_f64_e64 v[0:1], 0 ; encoding: [0x00,0x00,0x72,0xd1,0x80,0x00,0x00,0x00] 243v_fract_f64_e64 v[0:1], 0 244 245// SICI: v_trunc_f32_e32 v0, -13 ; encoding: [0xcd,0x42,0x00,0x7e] 246// GFX89: v_trunc_f32_e32 v0, -13 ; encoding: [0xcd,0x38,0x00,0x7e] 247v_trunc_f32_e32 v0, -13 248 249// SICI: v_fract_f64_e32 v[0:1], -13 ; encoding: [0xcd,0x7c,0x00,0x7e] 250// GFX89: v_fract_f64_e32 v[0:1], -13 ; encoding: [0xcd,0x64,0x00,0x7e] 251v_fract_f64_e32 v[0:1], -13 252 253// SICI: v_trunc_f32_e64 v0, -13 ; encoding: [0x00,0x00,0x42,0xd3,0xcd,0x00,0x00,0x00] 254// GFX89: v_trunc_f32_e64 v0, -13 ; encoding: [0x00,0x00,0x5c,0xd1,0xcd,0x00,0x00,0x00] 255v_trunc_f32_e64 v0, -13 256 257// SICI: v_fract_f64_e64 v[0:1], -13 ; encoding: [0x00,0x00,0x7c,0xd3,0xcd,0x00,0x00,0x00] 258// GFX89: v_fract_f64_e64 v[0:1], -13 ; encoding: [0x00,0x00,0x72,0xd1,0xcd,0x00,0x00,0x00] 259v_fract_f64_e64 v[0:1], -13 260 261// SICI: v_trunc_f32_e32 v0, 35 ; encoding: [0xa3,0x42,0x00,0x7e] 262// GFX89: v_trunc_f32_e32 v0, 35 ; encoding: [0xa3,0x38,0x00,0x7e] 263v_trunc_f32_e32 v0, 35 264 265// SICI: v_fract_f64_e32 v[0:1], 35 ; encoding: [0xa3,0x7c,0x00,0x7e] 266// GFX89: v_fract_f64_e32 v[0:1], 35 ; encoding: [0xa3,0x64,0x00,0x7e] 267v_fract_f64_e32 v[0:1], 35 268 269// SICI: v_trunc_f32_e64 v0, 35 ; encoding: [0x00,0x00,0x42,0xd3,0xa3,0x00,0x00,0x00] 270// GFX89: v_trunc_f32_e64 v0, 35 ; encoding: [0x00,0x00,0x5c,0xd1,0xa3,0x00,0x00,0x00] 271v_trunc_f32_e64 v0, 35 272 273// SICI: v_fract_f64_e64 v[0:1], 35 ; encoding: [0x00,0x00,0x7c,0xd3,0xa3,0x00,0x00,0x00] 274// GFX89: v_fract_f64_e64 v[0:1], 35 ; encoding: [0x00,0x00,0x72,0xd1,0xa3,0x00,0x00,0x00] 275v_fract_f64_e64 v[0:1], 35 276 277// SICI: v_trunc_f32_e32 v0, 0x4d2 ; encoding: [0xff,0x42,0x00,0x7e,0xd2,0x04,0x00,0x00] 278// GFX89: v_trunc_f32_e32 v0, 0x4d2 ; encoding: [0xff,0x38,0x00,0x7e,0xd2,0x04,0x00,0x00] 279v_trunc_f32_e32 v0, 1234 280 281// SICI: v_fract_f64_e32 v[0:1], 0x4d2 ; encoding: [0xff,0x7c,0x00,0x7e,0xd2,0x04,0x00,0x00] 282// GFX89: v_fract_f64_e32 v[0:1], 0x4d2 ; encoding: [0xff,0x64,0x00,0x7e,0xd2,0x04,0x00,0x00] 283v_fract_f64_e32 v[0:1], 1234 284 285// NOSICI: error: literal operands are not supported 286// NOGFX89: error: literal operands are not supported 287v_trunc_f32_e64 v0, 1234 288 289// NOSICI: error: literal operands are not supported 290// NOGFX89: error: literal operands are not supported 291v_fract_f64_e64 v[0:1], 1234 292 293// SICI: v_trunc_f32_e32 v0, 0xffff2bcf ; encoding: [0xff,0x42,0x00,0x7e,0xcf,0x2b,0xff,0xff] 294// GFX89: v_trunc_f32_e32 v0, 0xffff2bcf ; encoding: [0xff,0x38,0x00,0x7e,0xcf,0x2b,0xff,0xff] 295v_trunc_f32_e32 v0, -54321 296 297// SICI: v_fract_f64_e32 v[0:1], 0xffff2bcf ; encoding: [0xff,0x7c,0x00,0x7e,0xcf,0x2b,0xff,0xff] 298// GFX89: v_fract_f64_e32 v[0:1], 0xffff2bcf ; encoding: [0xff,0x64,0x00,0x7e,0xcf,0x2b,0xff,0xff] 299v_fract_f64_e32 v[0:1], -54321 300 301// SICI: v_trunc_f32_e32 v0, 0xdeadbeef ; encoding: [0xff,0x42,0x00,0x7e,0xef,0xbe,0xad,0xde] 302// GFX89: v_trunc_f32_e32 v0, 0xdeadbeef ; encoding: [0xff,0x38,0x00,0x7e,0xef,0xbe,0xad,0xde] 303v_trunc_f32_e32 v0, 0xdeadbeef 304 305// SICI: v_fract_f64_e32 v[0:1], 0xdeadbeef ; encoding: [0xff,0x7c,0x00,0x7e,0xef,0xbe,0xad,0xde] 306// GFX89: v_fract_f64_e32 v[0:1], 0xdeadbeef ; encoding: [0xff,0x64,0x00,0x7e,0xef,0xbe,0xad,0xde] 307v_fract_f64_e32 v[0:1], 0xdeadbeef 308 309// SICI: v_trunc_f32_e32 v0, -1 ; encoding: [0xc1,0x42,0x00,0x7e] 310// GFX89: v_trunc_f32_e32 v0, -1 ; encoding: [0xc1,0x38,0x00,0x7e] 311v_trunc_f32_e32 v0, 0xffffffff 312 313// SICI: v_fract_f64_e32 v[0:1], 0xffffffff ; encoding: [0xff,0x7c,0x00,0x7e,0xff,0xff,0xff,0xff] 314// GFX89: v_fract_f64_e32 v[0:1], 0xffffffff ; encoding: [0xff,0x64,0x00,0x7e,0xff,0xff,0xff,0xff] 315v_fract_f64_e32 v[0:1], 0xffffffff 316 317// NOSICI: error: invalid operand for instruction 318// NOGFX89: error: invalid operand for instruction 319v_trunc_f32_e32 v0, 0x123456789abcdef0 320 321// NOSICI: error: invalid operand for instruction 322// NOGFX89: error: invalid operand for instruction 323v_fract_f64_e32 v[0:1], 0x123456789abcdef0 324 325// SICI: v_trunc_f32_e32 v0, -1 ; encoding: [0xc1,0x42,0x00,0x7e] 326// GFX89: v_trunc_f32_e32 v0, -1 ; encoding: [0xc1,0x38,0x00,0x7e] 327v_trunc_f32_e32 v0, 0xffffffffffffffff 328 329// SICI: v_fract_f64_e32 v[0:1], -1 ; encoding: [0xc1,0x7c,0x00,0x7e] 330// GFX89: v_fract_f64_e32 v[0:1], -1 ; encoding: [0xc1,0x64,0x00,0x7e] 331v_fract_f64_e32 v[0:1], 0xffffffffffffffff 332 333//---------------------------------------------------------------------------// 334// int literal, expected int operand 335//---------------------------------------------------------------------------// 336 337// SICI: s_mov_b64 s[0:1], 0 ; encoding: [0x80,0x04,0x80,0xbe] 338// GFX89: s_mov_b64 s[0:1], 0 ; encoding: [0x80,0x01,0x80,0xbe] 339s_mov_b64_e32 s[0:1], 0 340 341// SICI: v_and_b32_e32 v0, 0, v1 ; encoding: [0x80,0x02,0x00,0x36] 342// GFX89: v_and_b32_e32 v0, 0, v1 ; encoding: [0x80,0x02,0x00,0x26] 343v_and_b32_e32 v0, 0, v1 344 345// SICI: v_and_b32_e64 v0, 0, v1 ; encoding: [0x00,0x00,0x36,0xd2,0x80,0x02,0x02,0x00] 346// GFX89: v_and_b32_e64 v0, 0, v1 ; encoding: [0x00,0x00,0x13,0xd1,0x80,0x02,0x02,0x00] 347v_and_b32_e64 v0, 0, v1 348 349// SICI: s_mov_b64 s[0:1], -13 ; encoding: [0xcd,0x04,0x80,0xbe] 350// GFX89: s_mov_b64 s[0:1], -13 ; encoding: [0xcd,0x01,0x80,0xbe] 351s_mov_b64_e32 s[0:1], -13 352 353// SICI: v_and_b32_e32 v0, -13, v1 ; encoding: [0xcd,0x02,0x00,0x36] 354// GFX89: v_and_b32_e32 v0, -13, v1 ; encoding: [0xcd,0x02,0x00,0x26] 355v_and_b32_e32 v0, -13, v1 356 357// SICI: v_and_b32_e64 v0, -13, v1 ; encoding: [0x00,0x00,0x36,0xd2,0xcd,0x02,0x02,0x00] 358// GFX89: v_and_b32_e64 v0, -13, v1 ; encoding: [0x00,0x00,0x13,0xd1,0xcd,0x02,0x02,0x00] 359v_and_b32_e64 v0, -13, v1 360 361// SICI: s_mov_b64 s[0:1], 35 ; encoding: [0xa3,0x04,0x80,0xbe] 362// GFX89: s_mov_b64 s[0:1], 35 ; encoding: [0xa3,0x01,0x80,0xbe] 363s_mov_b64_e32 s[0:1], 35 364 365// SICI: v_and_b32_e32 v0, 35, v1 ; encoding: [0xa3,0x02,0x00,0x36] 366// GFX89: v_and_b32_e32 v0, 35, v1 ; encoding: [0xa3,0x02,0x00,0x26] 367v_and_b32_e32 v0, 35, v1 368 369// SICI: v_and_b32_e64 v0, 35, v1 ; encoding: [0x00,0x00,0x36,0xd2,0xa3,0x02,0x02,0x00] 370// GFX89: v_and_b32_e64 v0, 35, v1 ; encoding: [0x00,0x00,0x13,0xd1,0xa3,0x02,0x02,0x00] 371v_and_b32_e64 v0, 35, v1 372 373// SICI: s_mov_b64 s[0:1], 0x4d2 ; encoding: [0xff,0x04,0x80,0xbe,0xd2,0x04,0x00,0x00] 374// GFX89: s_mov_b64 s[0:1], 0x4d2 ; encoding: [0xff,0x01,0x80,0xbe,0xd2,0x04,0x00,0x00] 375s_mov_b64_e32 s[0:1], 1234 376 377// SICI: v_and_b32_e32 v0, 0x4d2, v1 ; encoding: [0xff,0x02,0x00,0x36,0xd2,0x04,0x00,0x00] 378// GFX89: v_and_b32_e32 v0, 0x4d2, v1 ; encoding: [0xff,0x02,0x00,0x26,0xd2,0x04,0x00,0x00] 379v_and_b32_e32 v0, 1234, v1 380 381// NOSICI: error: literal operands are not supported 382// NOGFX89: error: literal operands are not supported 383v_and_b32_e64 v0, 1234, v1 384 385// SICI: s_mov_b64 s[0:1], 0xffff2bcf ; encoding: [0xff,0x04,0x80,0xbe,0xcf,0x2b,0xff,0xff] 386// GFX89: s_mov_b64 s[0:1], 0xffff2bcf ; encoding: [0xff,0x01,0x80,0xbe,0xcf,0x2b,0xff,0xff] 387s_mov_b64_e32 s[0:1], -54321 388 389// SICI: v_and_b32_e32 v0, 0xffff2bcf, v1 ; encoding: [0xff,0x02,0x00,0x36,0xcf,0x2b,0xff,0xff] 390// GFX89: v_and_b32_e32 v0, 0xffff2bcf, v1 ; encoding: [0xff,0x02,0x00,0x26,0xcf,0x2b,0xff,0xff] 391v_and_b32_e32 v0, -54321, v1 392 393// SICI: s_mov_b64 s[0:1], 0xdeadbeef ; encoding: [0xff,0x04,0x80,0xbe,0xef,0xbe,0xad,0xde] 394// GFX89: s_mov_b64 s[0:1], 0xdeadbeef ; encoding: [0xff,0x01,0x80,0xbe,0xef,0xbe,0xad,0xde] 395s_mov_b64_e32 s[0:1], 0xdeadbeef 396 397// SICI: v_and_b32_e32 v0, 0xdeadbeef, v1 ; encoding: [0xff,0x02,0x00,0x36,0xef,0xbe,0xad,0xde] 398// GFX89: v_and_b32_e32 v0, 0xdeadbeef, v1 ; encoding: [0xff,0x02,0x00,0x26,0xef,0xbe,0xad,0xde] 399v_and_b32_e32 v0, 0xdeadbeef, v1 400 401// SICI: s_mov_b64 s[0:1], 0xffffffff ; encoding: [0xff,0x04,0x80,0xbe,0xff,0xff,0xff,0xff] 402// GFX89: s_mov_b64 s[0:1], 0xffffffff ; encoding: [0xff,0x01,0x80,0xbe,0xff,0xff,0xff,0xff] 403s_mov_b64_e32 s[0:1], 0xffffffff 404 405// SICI: v_and_b32_e32 v0, -1, v1 ; encoding: [0xc1,0x02,0x00,0x36] 406// GFX89: v_and_b32_e32 v0, -1, v1 ; encoding: [0xc1,0x02,0x00,0x26] 407v_and_b32_e32 v0, 0xffffffff, v1 408 409// NOSICI: error: invalid operand for instruction 410// NOGFX89: error: invalid operand for instruction 411s_mov_b64_e32 s[0:1], 0x123456789abcdef0 412 413// NOSICI: error: invalid operand for instruction 414// NOGFX89: error: invalid operand for instruction 415v_and_b32_e32 v0, 0x123456789abcdef0, v1 416 417// SICI: s_mov_b64 s[0:1], -1 ; encoding: [0xc1,0x04,0x80,0xbe] 418// GFX89: s_mov_b64 s[0:1], -1 ; encoding: [0xc1,0x01,0x80,0xbe] 419s_mov_b64_e32 s[0:1], 0xffffffffffffffff 420 421// SICI: v_and_b32_e32 v0, -1, v1 ; encoding: [0xc1,0x02,0x00,0x36] 422// GFX89: v_and_b32_e32 v0, -1, v1 ; encoding: [0xc1,0x02,0x00,0x26] 423v_and_b32_e32 v0, 0xffffffffffffffff, v1 424 425//---------------------------------------------------------------------------// 426// 1/(2*PI) 427//---------------------------------------------------------------------------// 428 429// NOSICI: error: invalid operand for instruction 430// NOGFX89: error: invalid operand for instruction 431v_trunc_f32_e32 v0, 0x3fc45f306dc9c882 432 433// NOSICI: error: invalid operand for instruction 434// GFX89: v_fract_f64_e32 v[0:1], 0.15915494309189532 ; encoding: [0xf8,0x64,0x00,0x7e] 435v_fract_f64_e32 v[0:1], 0x3fc45f306dc9c882 436 437// SICI: v_trunc_f32_e32 v0, 0x3e22f983 ; encoding: [0xff,0x42,0x00,0x7e,0x83,0xf9,0x22,0x3e] 438// GFX89: v_trunc_f32_e32 v0, 0.15915494 ; encoding: [0xf8,0x38,0x00,0x7e] 439v_trunc_f32_e32 v0, 0x3e22f983 440 441// SICI: v_fract_f64_e32 v[0:1], 0x3e22f983 ; encoding: [0xff,0x7c,0x00,0x7e,0x83,0xf9,0x22,0x3e] 442// GFX89: v_fract_f64_e32 v[0:1], 0x3e22f983 ; encoding: [0xff,0x64,0x00,0x7e,0x83,0xf9,0x22,0x3e] 443v_fract_f64_e32 v[0:1], 0x3e22f983 444 445// NOSICI: error: invalid operand for instruction 446// NOGFX89: error: invalid operand for instruction 447v_trunc_f32_e64 v0, 0x3fc45f306dc9c882 448 449// NOSICI: error: invalid operand for instruction 450// GFX89: v_fract_f64_e64 v[0:1], 0.15915494309189532 ; encoding: [0x00,0x00,0x72,0xd1,0xf8,0x00,0x00,0x00] 451v_fract_f64_e64 v[0:1], 0x3fc45f306dc9c882 452 453// NOSICI: error: literal operands are not supported 454// GFX89: v_trunc_f32_e64 v0, 0.15915494 ; encoding: [0x00,0x00,0x5c,0xd1,0xf8,0x00,0x00,0x00] 455v_trunc_f32_e64 v0, 0x3e22f983 456 457// NOSICI: error: literal operands are not supported 458// NOGFX89: error: literal operands are not supported 459v_fract_f64_e64 v[0:1], 0x3e22f983 460 461// NOSICI: error: invalid operand for instruction 462// GFX89: s_mov_b64 s[0:1], 0.15915494309189532 ; encoding: [0xf8,0x01,0x80,0xbe] 463s_mov_b64_e32 s[0:1], 0.159154943091895317852646485335 464 465// SICI: v_and_b32_e32 v0, 0x3e22f983, v1 ; encoding: [0xff,0x02,0x00,0x36,0x83,0xf9,0x22,0x3e] 466// GFX89: v_and_b32_e32 v0, 0.15915494, v1 ; encoding: [0xf8,0x02,0x00,0x26] 467v_and_b32_e32 v0, 0.159154943091895317852646485335, v1 468 469// NOSICI: error: literal operands are not supported 470// GFX89: v_and_b32_e64 v0, 0.15915494, v1 ; encoding: [0x00,0x00,0x13,0xd1,0xf8,0x02,0x02,0x00] 471v_and_b32_e64 v0, 0.159154943091895317852646485335, v1 472 473// SICI: v_fract_f64_e32 v[0:1], 0x3fc45f30 ; encoding: [0xff,0x7c,0x00,0x7e,0x30,0x5f,0xc4,0x3f] 474// GFX89: v_fract_f64_e32 v[0:1], 0.15915494309189532 ; encoding: [0xf8,0x64,0x00,0x7e] 475v_fract_f64 v[0:1], 0.159154943091895317852646485335 476 477// SICI: v_trunc_f32_e32 v0, 0x3e22f983 ; encoding: [0xff,0x42,0x00,0x7e,0x83,0xf9,0x22,0x3e] 478// GFX89: v_trunc_f32_e32 v0, 0.15915494 ; encoding: [0xf8,0x38,0x00,0x7e] 479v_trunc_f32 v0, 0.159154943091895317852646485335 480 481//---------------------------------------------------------------------------// 482// integer literal truncation checks 483//---------------------------------------------------------------------------// 484 485// NOGCN: error: invalid operand for instruction 486s_mov_b32 s0, 0x101ffffffff 487 488// NOGCN: error: invalid operand for instruction 489s_mov_b32 s0, 0x1000000001 490 491// NOGCN: error: invalid operand for instruction 492s_mov_b32 s0, 0x1000000fff 493 494// NOGCN: error: invalid operand for instruction 495v_trunc_f32 v0, 0x1fffffffff0 496 497// NOGCN: error: invalid operand for instruction 498v_trunc_f32 v0, 0x100000001 499 500// NOGCN: error: invalid operand for instruction 501v_trunc_f32 v0, 0x1fffffff000 502 503// NOGCN: error: invalid operand for instruction 504s_mov_b64 s[0:1], 0x101ffffffff 505 506// NOGCN: error: invalid operand for instruction 507s_mov_b64 s[0:1], 0x1000000001 508 509// NOGCN: error: invalid operand for instruction 510s_mov_b64 s[0:1], 0x1000000fff 511 512// NOGFX89: error: invalid operand for instruction 513// NOSI: error: instruction not supported on this GPU 514// NOCIVI: error: invalid operand for instruction 515v_trunc_f64 v[0:1], 0x1fffffffff0 516 517// NOGFX89: error: invalid operand for instruction 518// NOSI: error: instruction not supported on this GPU 519// NOCIVI: error: invalid operand for instruction 520v_trunc_f64 v[0:1], 0x100000001 521 522// NOGFX89: error: invalid operand for instruction 523// NOSI: error: instruction not supported on this GPU 524// NOCIVI: error: invalid operand for instruction 525v_trunc_f64 v[0:1], 0x1fffffff000 526 527//---------------------------------------------------------------------------// 528// named inline values: scc, vccz, execz 529//---------------------------------------------------------------------------// 530 531// SICI: buffer_atomic_add v0, off, s[0:3], src_scc offset:4095 ; encoding: [0xff,0x0f,0xc8,0xe0,0x00,0x00,0x00,0xfd] 532// GFX89: buffer_atomic_add v0, off, s[0:3], src_scc offset:4095 ; encoding: [0xff,0x0f,0x08,0xe1,0x00,0x00,0x00,0xfd] 533buffer_atomic_add v0, off, s[0:3], scc offset:4095 534 535// SICI: s_add_i32 s0, src_vccz, s0 ; encoding: [0xfb,0x00,0x00,0x81] 536// GFX89: s_add_i32 s0, src_vccz, s0 ; encoding: [0xfb,0x00,0x00,0x81] 537s_add_i32 s0, vccz, s0 538 539// SICI: s_add_i32 s0, src_execz, s0 ; encoding: [0xfc,0x00,0x00,0x81] 540// GFX89: s_add_i32 s0, src_execz, s0 ; encoding: [0xfc,0x00,0x00,0x81] 541s_add_i32 s0, execz, s0 542 543// SICI: s_add_i32 s0, src_scc, s0 ; encoding: [0xfd,0x00,0x00,0x81] 544// GFX89: s_add_i32 s0, src_scc, s0 ; encoding: [0xfd,0x00,0x00,0x81] 545s_add_i32 s0, scc, s0 546 547// SICI: s_and_b64 s[0:1], s[0:1], src_vccz ; encoding: [0x00,0xfb,0x80,0x87] 548// GFX89: s_and_b64 s[0:1], s[0:1], src_vccz ; encoding: [0x00,0xfb,0x80,0x86] 549s_and_b64 s[0:1], s[0:1], src_vccz 550 551// SICI: s_and_b64 s[0:1], s[0:1], src_execz ; encoding: [0x00,0xfc,0x80,0x87] 552// GFX89: s_and_b64 s[0:1], s[0:1], src_execz ; encoding: [0x00,0xfc,0x80,0x86] 553s_and_b64 s[0:1], s[0:1], src_execz 554 555// SICI: s_and_b64 s[0:1], s[0:1], src_scc ; encoding: [0x00,0xfd,0x80,0x87] 556// GFX89: s_and_b64 s[0:1], s[0:1], src_scc ; encoding: [0x00,0xfd,0x80,0x86] 557s_and_b64 s[0:1], s[0:1], src_scc 558 559// NOSICI: error: instruction not supported on this GPU 560// GFX89: v_add_u16_e32 v0, src_vccz, v0 ; encoding: [0xfb,0x00,0x00,0x4c] 561v_add_u16 v0, vccz, v0 562 563// NOSICI: error: instruction not supported on this GPU 564// NOVI: error: invalid operand for instruction 565// GFX9: v_add_u16_sdwa v0, src_scc, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD ; encoding: [0xf9,0x00,0x00,0x4c,0xfd,0x06,0x86,0x06] 566v_add_u16_sdwa v0, scc, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD 567 568// NOSICI: error: instruction not supported on this GPU 569// NOVI: error: invalid operand for instruction 570// GFX9: v_add_u16_sdwa v0, v0, src_scc dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD ; encoding: [0xf9,0xfa,0x01,0x4c,0x00,0x06,0x06,0x86] 571v_add_u16_sdwa v0, v0, scc dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD 572 573// GFX9: v_add_u32_e32 v0, src_execz, v0 ; encoding: [0xfc,0x00,0x00,0x68] 574// NOSICI: error: instruction not supported on this GPU 575// NOVI: error: operands are not valid for this GPU or mode 576v_add_u32 v0, execz, v0 577 578// GFX9: v_add_u32_e64 v0, src_scc, v0 ; encoding: [0x00,0x00,0x34,0xd1,0xfd,0x00,0x02,0x00] 579// NOSICI: error: instruction not supported on this GPU 580// NOVI: error: operands are not valid for this GPU or mode 581v_add_u32_e64 v0, scc, v0 582 583// SICI: v_cmp_eq_i64_e32 vcc, src_scc, v[0:1] ; encoding: [0xfd,0x00,0x44,0x7d] 584// GFX89: v_cmp_eq_i64_e32 vcc, src_scc, v[0:1] ; encoding: [0xfd,0x00,0xc4,0x7d] 585v_cmp_eq_i64 vcc, scc, v[0:1] 586 587// NOSICI: error: instruction not supported on this GPU 588// GFX89: v_max_f16_e32 v0, src_execz, v0 ; encoding: [0xfc,0x00,0x00,0x5a] 589v_max_f16 v0, execz, v0 590 591// SICI: v_max_f32_e32 v0, src_vccz, v0 ; encoding: [0xfb,0x00,0x00,0x20] 592// GFX89: v_max_f32_e32 v0, src_vccz, v0 ; encoding: [0xfb,0x00,0x00,0x16] 593v_max_f32 v0, vccz, v0 594 595// SICI: v_max_f64 v[0:1], src_scc, v[0:1] ; encoding: [0x00,0x00,0xce,0xd2,0xfd,0x00,0x02,0x00] 596// GFX89: v_max_f64 v[0:1], src_scc, v[0:1] ; encoding: [0x00,0x00,0x83,0xd2,0xfd,0x00,0x02,0x00] 597v_max_f64 v[0:1], scc, v[0:1] 598 599// NOSICIVI: error: instruction not supported on this GPU 600// GFX9: v_pk_add_f16 v0, src_execz, v0 ; encoding: [0x00,0x40,0x8f,0xd3,0xfc,0x00,0x02,0x18] 601v_pk_add_f16 v0, execz, v0 602 603// NOSICI: error: instruction not supported on this GPU 604// GFX89: v_ceil_f16_e64 v0, -src_vccz ; encoding: [0x00,0x00,0x85,0xd1,0xfb,0x00,0x00,0x20] 605v_ceil_f16 v0, neg(vccz) 606 607// NOSICI: error: instruction not supported on this GPU 608// GFX89: v_ceil_f16_e64 v0, |src_scc| ; encoding: [0x00,0x01,0x85,0xd1,0xfd,0x00,0x00,0x00] 609v_ceil_f16 v0, abs(scc) 610 611// NOSI: error: instruction not supported on this GPU 612// CI: v_ceil_f64_e64 v[5:6], |src_execz| ; encoding: [0x05,0x01,0x30,0xd3,0xfc,0x00,0x00,0x00] 613// GFX89: v_ceil_f64_e64 v[5:6], |src_execz| ; encoding: [0x05,0x01,0x58,0xd1,0xfc,0x00,0x00,0x00] 614v_ceil_f64 v[5:6], |execz| 615 616// NOSI: error: instruction not supported on this GPU 617// CI: v_ceil_f64_e64 v[5:6], -vcc ; encoding: [0x05,0x00,0x30,0xd3,0x6a,0x00,0x00,0x20] 618// GFX89: v_ceil_f64_e64 v[5:6], -vcc ; encoding: [0x05,0x00,0x58,0xd1,0x6a,0x00,0x00,0x20] 619v_ceil_f64 v[5:6], -vcc 620 621// SICI: v_ceil_f32_e64 v0, -src_vccz ; encoding: [0x00,0x00,0x44,0xd3,0xfb,0x00,0x00,0x20] 622// GFX89: v_ceil_f32_e64 v0, -src_vccz ; encoding: [0x00,0x00,0x5d,0xd1,0xfb,0x00,0x00,0x20] 623v_ceil_f32 v0, -vccz 624 625// SICI: v_ceil_f32_e64 v0, |src_execz| ; encoding: [0x00,0x01,0x44,0xd3,0xfc,0x00,0x00,0x00] 626// GFX89: v_ceil_f32_e64 v0, |src_execz| ; encoding: [0x00,0x01,0x5d,0xd1,0xfc,0x00,0x00,0x00] 627v_ceil_f32 v0, |execz| 628 629// NOSICI: error: instruction not supported on this GPU 630// NOVI: error: invalid operand for instruction 631// GFX9: v_ceil_f16_sdwa v5, |src_vccz| dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x8a,0x0a,0x7e,0xfb,0x16,0xa6,0x00] 632v_ceil_f16_sdwa v5, |vccz| dst_sel:DWORD dst_unused:UNUSED_PRESERVE 633 634// NOSICI: error: instruction not supported on this GPU 635// NOVI: error: invalid operand for instruction 636// GFX9: v_ceil_f16_sdwa v5, -src_scc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x8a,0x0a,0x7e,0xfd,0x16,0x96,0x00] 637v_ceil_f16_sdwa v5, -scc dst_sel:DWORD dst_unused:UNUSED_PRESERVE 638 639// GFX9: v_ceil_f32_sdwa v5, src_vccz dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x3a,0x0a,0x7e,0xfb,0x16,0x86,0x00] 640// NOSICI: error: sdwa variant of this instruction is not supported 641// NOVI: error: invalid operand for instruction 642v_ceil_f32_sdwa v5, vccz dst_sel:DWORD src0_sel:DWORD 643 644// GFX9: v_ceil_f32_sdwa v5, |src_execz| dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x3a,0x0a,0x7e,0xfc,0x16,0xa6,0x00] 645// NOSICI: error: sdwa variant of this instruction is not supported 646// NOVI: error: invalid operand for instruction 647v_ceil_f32_sdwa v5, |execz| dst_sel:DWORD src0_sel:DWORD 648 649//---------------------------------------------------------------------------// 650// named inline values: shared_base, shared_limit, private_base, etc 651//---------------------------------------------------------------------------// 652 653// NOSICIVI: error: register not available on this GPU 654// GFX9: buffer_atomic_add v0, off, s[0:3], src_shared_base offset:4095 ; encoding: [0xff,0x0f,0x08,0xe1,0x00,0x00,0x00,0xeb] 655buffer_atomic_add v0, off, s[0:3], src_shared_base offset:4095 656 657// NOSICIVI: error: register not available on this GPU 658// GFX9: s_add_i32 s0, src_shared_base, s0 ; encoding: [0xeb,0x00,0x00,0x81] 659s_add_i32 s0, src_shared_base, s0 660 661// NOSICIVI: error: register not available on this GPU 662// GFX9: s_add_i32 s0, src_shared_limit, s0 ; encoding: [0xec,0x00,0x00,0x81] 663s_add_i32 s0, src_shared_limit, s0 664 665// NOSICIVI: error: register not available on this GPU 666// GFX9: s_add_i32 s0, src_private_base, s0 ; encoding: [0xed,0x00,0x00,0x81] 667s_add_i32 s0, src_private_base, s0 668 669// NOSICIVI: error: register not available on this GPU 670// GFX9: s_add_i32 s0, src_private_limit, s0 ; encoding: [0xee,0x00,0x00,0x81] 671s_add_i32 s0, src_private_limit, s0 672 673// NOSICIVI: error: register not available on this GPU 674// GFX9: s_add_i32 s0, src_pops_exiting_wave_id, s0 ; encoding: [0xef,0x00,0x00,0x81] 675s_add_i32 s0, src_pops_exiting_wave_id, s0 676 677// NOSICIVI: error: register not available on this GPU 678// GFX9: s_and_b64 s[0:1], s[0:1], src_shared_base ; encoding: [0x00,0xeb,0x80,0x86] 679s_and_b64 s[0:1], s[0:1], src_shared_base 680 681// NOSICIVI: error: register not available on this GPU 682// GFX9: s_and_b64 s[0:1], s[0:1], src_shared_limit ; encoding: [0x00,0xec,0x80,0x86] 683s_and_b64 s[0:1], s[0:1], src_shared_limit 684 685// NOSICIVI: error: register not available on this GPU 686// GFX9: s_and_b64 s[0:1], s[0:1], src_private_base ; encoding: [0x00,0xed,0x80,0x86] 687s_and_b64 s[0:1], s[0:1], src_private_base 688 689// NOSICIVI: error: register not available on this GPU 690// GFX9: s_and_b64 s[0:1], s[0:1], src_private_limit ; encoding: [0x00,0xee,0x80,0x86] 691s_and_b64 s[0:1], s[0:1], src_private_limit 692 693// NOSICIVI: error: register not available on this GPU 694// GFX9: s_and_b64 s[0:1], s[0:1], src_pops_exiting_wave_id ; encoding: [0x00,0xef,0x80,0x86] 695s_and_b64 s[0:1], s[0:1], src_pops_exiting_wave_id 696 697// GFX9: v_add_u16_e32 v0, src_shared_base, v0 ; encoding: [0xeb,0x00,0x00,0x4c] 698// NOSICI: error: instruction not supported on this GPU 699// NOVI: error: register not available on this GPU 700v_add_u16 v0, src_shared_base, v0 701 702// GFX9: v_add_u16_sdwa v0, src_shared_base, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD ; encoding: [0xf9,0x00,0x00,0x4c,0xeb,0x06,0x86,0x06] 703// NOSICI: error: instruction not supported on this GPU 704// NOVI: error: register not available on this GPU 705v_add_u16_sdwa v0, src_shared_base, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD 706 707// GFX9: v_add_u16_sdwa v0, v0, src_shared_base dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD ; encoding: [0xf9,0xd6,0x01,0x4c,0x00,0x06,0x06,0x86] 708// NOSICI: error: instruction not supported on this GPU 709// NOVI: error: register not available on this GPU 710v_add_u16_sdwa v0, v0, src_shared_base dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD 711 712// GFX9: v_add_u32_e32 v0, src_shared_base, v0 ; encoding: [0xeb,0x00,0x00,0x68] 713// NOSICI: error: instruction not supported on this GPU 714// NOVI: error: register not available on this GPU 715v_add_u32 v0, src_shared_base, v0 716 717// GFX9: v_add_u32_e64 v0, src_shared_base, v0 ; encoding: [0x00,0x00,0x34,0xd1,0xeb,0x00,0x02,0x00] 718// NOSICI: error: instruction not supported on this GPU 719// NOVI: error: register not available on this GPU 720v_add_u32_e64 v0, src_shared_base, v0 721 722// NOSICIVI: error: register not available on this GPU 723// GFX9: v_cmp_eq_i64_e32 vcc, src_shared_base, v[0:1] ; encoding: [0xeb,0x00,0xc4,0x7d] 724v_cmp_eq_i64 vcc, src_shared_base, v[0:1] 725 726// GFX9: v_max_f16_e32 v0, src_shared_base, v0 ; encoding: [0xeb,0x00,0x00,0x5a] 727// NOSICI: error: instruction not supported on this GPU 728// NOVI: error: register not available on this GPU 729v_max_f16 v0, src_shared_base, v0 730 731// NOSICIVI: error: register not available on this GPU 732// GFX9: v_max_f32_e32 v0, src_shared_base, v0 ; encoding: [0xeb,0x00,0x00,0x16] 733v_max_f32 v0, src_shared_base, v0 734 735// NOSICIVI: error: register not available on this GPU 736// GFX9: v_max_f64 v[0:1], src_shared_base, v[0:1] ; encoding: [0x00,0x00,0x83,0xd2,0xeb,0x00,0x02,0x00] 737v_max_f64 v[0:1], src_shared_base, v[0:1] 738 739// NOSICIVI: error: instruction not supported on this GPU 740// GFX9: v_pk_add_f16 v0, src_shared_base, v0 ; encoding: [0x00,0x40,0x8f,0xd3,0xeb,0x00,0x02,0x18] 741v_pk_add_f16 v0, src_shared_base, v0 742 743// GFX9: v_ceil_f16_e64 v0, -src_shared_base ; encoding: [0x00,0x00,0x85,0xd1,0xeb,0x00,0x00,0x20] 744// NOSICI: error: instruction not supported on this GPU 745// NOVI: error: register not available on this GPU 746v_ceil_f16 v0, neg(src_shared_base) 747 748// GFX9: v_ceil_f16_e64 v0, |src_shared_base| ; encoding: [0x00,0x01,0x85,0xd1,0xeb,0x00,0x00,0x00] 749// NOSICI: error: instruction not supported on this GPU 750// NOVI: error: register not available on this GPU 751v_ceil_f16 v0, abs(src_shared_base) 752 753// GFX9: v_ceil_f64_e64 v[5:6], |src_shared_base| ; encoding: [0x05,0x01,0x58,0xd1,0xeb,0x00,0x00,0x00] 754// NOSI: error: instruction not supported on this GPU 755// NOCIVI: error: register not available on this GPU 756// NOVI: error: register not available on this GPU 757v_ceil_f64 v[5:6], |src_shared_base| 758 759// GFX9: v_ceil_f64_e64 v[5:6], -src_shared_base ; encoding: [0x05,0x00,0x58,0xd1,0xeb,0x00,0x00,0x20] 760// NOSI: error: instruction not supported on this GPU 761// NOCIVI: error: register not available on this GPU 762// NOVI: error: register not available on this GPU 763v_ceil_f64 v[5:6], -src_shared_base 764 765// NOSICIVI: error: register not available on this GPU 766// GFX9: v_ceil_f32_e64 v0, -src_shared_base ; encoding: [0x00,0x00,0x5d,0xd1,0xeb,0x00,0x00,0x20] 767v_ceil_f32 v0, -src_shared_base 768 769// NOSICIVI: error: register not available on this GPU 770// GFX9: v_ceil_f32_e64 v0, |src_shared_base| ; encoding: [0x00,0x01,0x5d,0xd1,0xeb,0x00,0x00,0x00] 771v_ceil_f32 v0, |src_shared_base| 772 773// GFX9: v_ceil_f16_sdwa v5, |src_shared_base| dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x8a,0x0a,0x7e,0xeb,0x16,0xa6,0x00] 774// NOSICI: error: instruction not supported on this GPU 775// NOVI: error: register not available on this GPU 776v_ceil_f16_sdwa v5, |src_shared_base| dst_sel:DWORD dst_unused:UNUSED_PRESERVE 777 778// GFX9: v_ceil_f16_sdwa v5, -src_shared_base dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x8a,0x0a,0x7e,0xeb,0x16,0x96,0x00] 779// NOSICI: error: instruction not supported on this GPU 780// NOVI: error: register not available on this GPU 781v_ceil_f16_sdwa v5, -src_shared_base dst_sel:DWORD dst_unused:UNUSED_PRESERVE 782 783// GFX9: v_ceil_f32_sdwa v5, src_shared_base dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x3a,0x0a,0x7e,0xeb,0x16,0x86,0x00] 784// NOSICI: error: sdwa variant of this instruction is not supported 785// NOVI: error: register not available on this GPU 786v_ceil_f32_sdwa v5, src_shared_base dst_sel:DWORD src0_sel:DWORD 787 788// GFX9: v_ceil_f32_sdwa v5, |src_shared_base| dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD ; encoding: [0xf9,0x3a,0x0a,0x7e,0xeb,0x16,0xa6,0x00] 789// NOSICI: error: sdwa variant of this instruction is not supported 790// NOVI: error: register not available on this GPU 791v_ceil_f32_sdwa v5, |src_shared_base| dst_sel:DWORD src0_sel:DWORD 792 793//---------------------------------------------------------------------------// 794// named inline values compete with other scalars for constant bus access 795//---------------------------------------------------------------------------// 796 797// NOGFX9: error: invalid operand (violates constant bus restrictions) 798// NOSICI: error: instruction not supported on this GPU 799// NOVI: error: register not available on this GPU 800v_add_u32 v0, private_base, s0 801 802// NOGFX9: error: invalid operand (violates constant bus restrictions) 803// NOSICI: error: instruction not supported on this GPU 804// NOVI: error: operands are not valid for this GPU or mode 805v_add_u32 v0, scc, s0 806 807// v_div_fmas implicitly reads VCC 808// NOSICIVI: error: register not available on this GPU 809// NOGFX9: error: invalid operand (violates constant bus restrictions) 810v_div_fmas_f32 v0, shared_base, v0, v1 811 812// v_div_fmas implicitly reads VCC 813// NOSICIVI: error: register not available on this GPU 814// NOGFX9: error: invalid operand (violates constant bus restrictions) 815v_div_fmas_f32 v0, v0, shared_limit, v1 816 817// v_div_fmas implicitly reads VCC 818// NOSICIVI: error: register not available on this GPU 819// NOGFX9: error: invalid operand (violates constant bus restrictions) 820v_div_fmas_f32 v0, v0, v1, private_limit 821 822// v_div_fmas implicitly reads VCC 823// NOGCN: error: invalid operand (violates constant bus restrictions) 824v_div_fmas_f32 v0, execz, v0, v1 825 826// v_div_fmas implicitly reads VCC 827// NOGCN: error: invalid operand (violates constant bus restrictions) 828v_div_fmas_f32 v0, v0, scc, v1 829 830// v_div_fmas implicitly reads VCC 831// NOGCN: error: invalid operand (violates constant bus restrictions) 832v_div_fmas_f32 v0, v0, v1, vccz 833 834// v_addc_co_u32 implicitly reads VCC (VOP2) 835// NOSICIVI: error: instruction not supported on this GPU 836// NOGFX9: error: invalid operand (violates constant bus restrictions) 837v_addc_co_u32 v0, vcc, shared_base, v0, vcc 838 839// NOSICIVI: error: register not available on this GPU 840// NOGFX9: error: invalid operand (violates constant bus restrictions) 841v_madak_f32 v0, shared_base, v0, 0x11213141 842 843// NOGCN: error: invalid operand (violates constant bus restrictions) 844v_madak_f32 v0, scc, v0, 0x11213141 845 846// NOSICIVI: error: register not available on this GPU 847// NOGFX9: error: invalid operand (violates constant bus restrictions) 848v_cmp_eq_f32 s[0:1], private_base, private_limit 849 850// NOSICIVI: error: register not available on this GPU 851// NOGFX9: error: invalid operand (violates constant bus restrictions) 852v_cmp_eq_f32 s[0:1], private_base, s0 853 854// NOGCN: error: invalid operand (violates constant bus restrictions) 855v_cmp_eq_f32 s[0:1], execz, s0 856 857// NOSICIVI: error: instruction not supported on this GPU 858// NOGFX9: error: invalid operand (violates constant bus restrictions) 859v_pk_add_f16 v255, private_base, private_limit 860 861// NOSICIVI: error: instruction not supported on this GPU 862// NOGFX9: error: invalid operand (violates constant bus restrictions) 863v_pk_add_f16 v255, vccz, execz 864