[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AMDGPU / bf16_imm.s
blob654248064106f3dee1c5ece2d983fb511d7c009f
1 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck %s
2 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -show-encoding %s | FileCheck %s
4 v_dot2_bf16_bf16 v5, v1, v2, 100.0
5 // CHECK: v_dot2_bf16_bf16 v5, v1, v2, 0x42c8 ; encoding: [0x05,0x00,0x67,0xd6,0x01,0x05,0xfe,0x03,0xc8,0x42,0x00,0x00]
7 v_dot2_bf16_bf16 v2, v0, 1.0, v2
8 // CHECK: v_dot2_bf16_bf16 v2, v0, 1.0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xe5,0x09,0x04]
10 v_dot2_bf16_bf16 v2, 1.0, v0, v2
11 // CHECK: v_dot2_bf16_bf16 v2, 1.0, v0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0xf2,0x00,0x0a,0x04]
13 v_dot2_bf16_bf16 v5, v1, v2, 1.0
14 // CHECK: v_dot2_bf16_bf16 v5, v1, v2, 1.0 ; encoding: [0x05,0x00,0x67,0xd6,0x01,0x05,0xca,0x03]
16 v_dot2_bf16_bf16 v2, v0, -1.0, v2
17 // CHECK: v_dot2_bf16_bf16 v2, v0, -1.0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xe7,0x09,0x04]
19 v_dot2_bf16_bf16 v2, v0, 0.5, v2
20 // CHECK: v_dot2_bf16_bf16 v2, v0, 0.5, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xe1,0x09,0x04]
22 v_dot2_bf16_bf16 v2, v0, -0.5, v2
23 // CHECK: v_dot2_bf16_bf16 v2, v0, -0.5, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xe3,0x09,0x04]
25 v_dot2_bf16_bf16 v2, v0, 2.0, v2
26 // CHECK: v_dot2_bf16_bf16 v2, v0, 2.0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xe9,0x09,0x04]
28 v_dot2_bf16_bf16 v2, v0, -2.0, v2
29 // CHECK: v_dot2_bf16_bf16 v2, v0, -2.0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xeb,0x09,0x04]
31 v_dot2_bf16_bf16 v2, v0, 4.0, v2
32 // CHECK: v_dot2_bf16_bf16 v2, v0, 4.0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xed,0x09,0x04]
34 v_dot2_bf16_bf16 v2, v0, -4.0, v2
35 // CHECK: v_dot2_bf16_bf16 v2, v0, -4.0, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xef,0x09,0x04]
37 // Check 1/(2*pi) rounded value and ideomatic fp32 0.15915494 value
38 // which cannot be accurately represented in bf16.
40 v_dot2_bf16_bf16 v2, v0, 0.158203125, v2
41 // CHECK: v_dot2_bf16_bf16 v2, v0, 0.15915494, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xf1,0x09,0x04]
43 v_dot2_bf16_bf16 v2, v0, 0.15915494, v2
44 // CHECK: v_dot2_bf16_bf16 v2, v0, 0.15915494, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xf1,0x09,0x04]
46 v_dot2_bf16_bf16 v2, v0, 0x3e22, v2
47 // CHECK: v_dot2_bf16_bf16 v2, v0, 0.15915494, v2 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0xf1,0x09,0x04]
49 v_dot2_bf16_bf16 v2, v0, v2, 0.15915494
50 // CHECK: v_dot2_bf16_bf16 v2, v0, v2, 0.15915494 ; encoding: [0x02,0x00,0x67,0xd6,0x00,0x05,0xe2,0x03]
52 v_dot2_f32_bf16 v2, v1, 0, v2
53 // CHECK: v_dot2_f32_bf16 v2, v1, 0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0x01,0x09,0x1c]
55 v_dot2_f32_bf16 v2, v1, 0.5, v2
56 // CHECK: v_dot2_f32_bf16 v2, v1, 0.5, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xe1,0x09,0x1c]
58 v_dot2_f32_bf16 v2, v1, -0.5, v2
59 // CHECK: v_dot2_f32_bf16 v2, v1, -0.5, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xe3,0x09,0x1c]
61 v_dot2_f32_bf16 v2, v1, 1.0, v2
62 // CHECK: v_dot2_f32_bf16 v2, v1, 1.0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xe5,0x09,0x1c]
64 v_dot2_f32_bf16 v2, v1, -1.0, v2
65 // CHECK: v_dot2_f32_bf16 v2, v1, -1.0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xe7,0x09,0x1c]
67 v_dot2_f32_bf16 v2, v1, 2.0, v2
68 // CHECK: v_dot2_f32_bf16 v2, v1, 2.0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xe9,0x09,0x1c]
70 v_dot2_f32_bf16 v2, v1, -2.0, v2
71 // CHECK: v_dot2_f32_bf16 v2, v1, -2.0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xeb,0x09,0x1c]
73 v_dot2_f32_bf16 v2, v1, 4.0, v2
74 // CHECK: v_dot2_f32_bf16 v2, v1, 4.0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xed,0x09,0x1c]
76 v_dot2_f32_bf16 v2, v1, -4.0, v2
77 // CHECK: v_dot2_f32_bf16 v2, v1, -4.0, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xef,0x09,0x1c]
79 v_dot2_f32_bf16 v2, v1, 0.15915494, v2
80 // CHECK: v_dot2_f32_bf16 v2, v1, 0.15915494, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xf1,0x09,0x1c]
82 v_dot2_f32_bf16 v2, v1, 0x3e22, v2
83 // CHECK: v_dot2_f32_bf16 v2, v1, 0.15915494, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xf1,0x09,0x1c]
85 v_dot2_f32_bf16 v2, 0.5, v1, v2
86 // CHECK: v_dot2_f32_bf16 v2, 0.5, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf0,0x02,0x0a,0x1c]
88 v_dot2_f32_bf16 v2, -0.5, v1, v2
89 // CHECK: v_dot2_f32_bf16 v2, -0.5, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf1,0x02,0x0a,0x1c]
91 v_dot2_f32_bf16 v2, 1.0, v1, v2
92 // CHECK: v_dot2_f32_bf16 v2, 1.0, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf2,0x02,0x0a,0x1c]
94 v_dot2_f32_bf16 v2, -1.0, v1, v2
95 // CHECK: v_dot2_f32_bf16 v2, -1.0, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf3,0x02,0x0a,0x1c]
97 v_dot2_f32_bf16 v2, 2.0, v1, v2
98 // CHECK: v_dot2_f32_bf16 v2, 2.0, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf4,0x02,0x0a,0x1c]
100 v_dot2_f32_bf16 v2, -2.0, v1, v2
101 // CHECK: v_dot2_f32_bf16 v2, -2.0, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf5,0x02,0x0a,0x1c]
103 v_dot2_f32_bf16 v2, 4.0, v1, v2
104 // CHECK: v_dot2_f32_bf16 v2, 4.0, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf6,0x02,0x0a,0x1c]
106 v_dot2_f32_bf16 v2, -4.0, v1, v2
107 // CHECK: v_dot2_f32_bf16 v2, -4.0, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xf7,0x02,0x0a,0x1c]
109 v_dot2_f32_bf16 v2, 100.0, v1, v2
110 // CHECK: v_dot2_f32_bf16 v2, 0x42c8, v1, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0xff,0x02,0x0a,0x1c,0xc8,0x42,0x00,0x00]
112 v_dot2_f32_bf16 v2, v1, 100.0, v2
113 // CHECK: v_dot2_f32_bf16 v2, v1, 0x42c8, v2 ; encoding: [0x02,0x40,0x1a,0xcc,0x01,0xff,0x09,0x1c,0xc8,0x42,0x00,0x00]