[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / AMDGPU / flat-scratch.s
blob9ff9ee3af7e51670de27658d2c84bf3f5410c8f8
1 // RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck -check-prefix=NOSI --implicit-check-not=error: %s
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=hawaii %s 2>&1 | FileCheck -check-prefix=NOCI --implicit-check-not=error: %s
3 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck -check-prefix=NOVI --implicit-check-not=error: %s
4 // RUN: not llvm-mc -arch=amdgcn -mcpu=hawaii -show-encoding %s | FileCheck -check-prefix=CI %s
5 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefix=VI %s
7 s_mov_b64 flat_scratch, -1
8 // NOSI: error: register not available on this GPU
9 // CI: s_mov_b64 flat_scratch, -1 ; encoding: [0xc1,0x04,0xe8,0xbe]
10 // VI: s_mov_b64 flat_scratch, -1 ; encoding: [0xc1,0x01,0xe6,0xbe]
12 s_mov_b32 flat_scratch_lo, -1
13 // NOSI: error: register not available on this GPU
14 // CI: s_mov_b32 flat_scratch_lo, -1 ; encoding: [0xc1,0x03,0xe8,0xbe]
15 // VI: s_mov_b32 flat_scratch_lo, -1 ; encoding: [0xc1,0x00,0xe6,0xbe]
17 s_mov_b32 flat_scratch_hi, -1
18 // NOSI: error: register not available on this GPU
19 // CI: s_mov_b32 flat_scratch_hi, -1 ; encoding: [0xc1,0x03,0xe9,0xbe]
20 // VI: s_mov_b32 flat_scratch_hi, -1 ; encoding: [0xc1,0x00,0xe7,0xbe]
23 s_mov_b64 flat_scratch_lo, -1
24 // NOSI: error: register not available on this GPU
25 // NOCI: error: invalid operand for instruction
26 // NOVI: error: invalid operand for instruction
28 s_mov_b64 flat_scratch_hi, -1
29 // NOSI: error: register not available on this GPU
30 // NOCI: error: invalid operand for instruction
31 // NOVI: error: invalid operand for instruction
33 s_mov_b32 flat_scratch, -1
34 // NOSI: error: register not available on this GPU
35 // NOCI: error: invalid operand for instruction
36 // NOVI: error: invalid operand for instruction