|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 |
| 2 | +; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx950 -verify-machineinstrs < %s | FileCheck --check-prefixes=GCN,GFX950-SDAG %s |
| 3 | +; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx950 -verify-machineinstrs < %s | FileCheck --check-prefixes=GCN,GFX950-GISEL %s |
| 4 | + |
| 5 | +declare <6 x i32> @llvm.amdgcn.cvt.scalef32.2xpk16.bf6.f32(<16 x float> %src0, <16 x float> %src1, float %scale) |
| 6 | +declare <6 x i32> @llvm.amdgcn.cvt.scalef32.2xpk16.fp6.f32(<16 x float> %src0, <16 x float> %src1, float %scale) |
| 7 | + |
| 8 | +define amdgpu_ps void @test_scalef32_pk32_fp6_f32_vv(<16 x float> %src, float %scale, ptr addrspace(1) %out) { |
| 9 | +; GFX950-SDAG-LABEL: test_scalef32_pk32_fp6_f32_vv: |
| 10 | +; GFX950-SDAG: ; %bb.0: |
| 11 | +; GFX950-SDAG-NEXT: v_mov_b32_e32 v19, v18 |
| 12 | +; GFX950-SDAG-NEXT: v_mov_b32_e32 v18, v17 |
| 13 | +; GFX950-SDAG-NEXT: v_cvt_scalef32_2xpk16_fp6_f32 v[0:5], v[0:15], v[0:15], v16 |
| 14 | +; GFX950-SDAG-NEXT: global_store_dwordx2 v[18:19], v[4:5], off offset:16 |
| 15 | +; GFX950-SDAG-NEXT: global_store_dwordx4 v[18:19], v[0:3], off |
| 16 | +; GFX950-SDAG-NEXT: s_endpgm |
| 17 | +; |
| 18 | +; GFX950-GISEL-LABEL: test_scalef32_pk32_fp6_f32_vv: |
| 19 | +; GFX950-GISEL: ; %bb.0: |
| 20 | +; GFX950-GISEL-NEXT: v_mov_b32_e32 v20, v17 |
| 21 | +; GFX950-GISEL-NEXT: v_mov_b32_e32 v21, v18 |
| 22 | +; GFX950-GISEL-NEXT: v_cvt_scalef32_2xpk16_fp6_f32 v[0:5], v[0:15], v[0:15], v16 |
| 23 | +; GFX950-GISEL-NEXT: global_store_dwordx4 v[20:21], v[0:3], off |
| 24 | +; GFX950-GISEL-NEXT: global_store_dwordx2 v[20:21], v[4:5], off offset:16 |
| 25 | +; GFX950-GISEL-NEXT: s_endpgm |
| 26 | + %cvt = tail call <6 x i32> @llvm.amdgcn.cvt.scalef32.2xpk16.fp6.f32(<16 x float> %src, <16 x float> %src, float %scale) |
| 27 | + store <6 x i32> %cvt, ptr addrspace(1) %out, align 8 |
| 28 | + ret void |
| 29 | +} |
| 30 | + |
| 31 | +define amdgpu_ps void @test_scalef32_pk32_fp6_f32_sl(<16 x float> inreg %src, ptr addrspace(1) %out) { |
| 32 | +; GFX950-SDAG-LABEL: test_scalef32_pk32_fp6_f32_sl: |
| 33 | +; GFX950-SDAG: ; %bb.0: |
| 34 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[16:17], s[14:15] |
| 35 | +; GFX950-SDAG-NEXT: s_mov_b32 s16, 0x42c80000 |
| 36 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[14:15], s[12:13] |
| 37 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[12:13], s[10:11] |
| 38 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[10:11], s[8:9] |
| 39 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[8:9], s[6:7] |
| 40 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[6:7], s[4:5] |
| 41 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[4:5], s[2:3] |
| 42 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[2:3], s[0:1] |
| 43 | +; GFX950-SDAG-NEXT: v_cvt_scalef32_2xpk16_fp6_f32 v[2:7], v[2:17], v[2:17], s16 |
| 44 | +; GFX950-SDAG-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16 |
| 45 | +; GFX950-SDAG-NEXT: global_store_dwordx4 v[0:1], v[2:5], off |
| 46 | +; GFX950-SDAG-NEXT: s_endpgm |
| 47 | +; |
| 48 | +; GFX950-GISEL-LABEL: test_scalef32_pk32_fp6_f32_sl: |
| 49 | +; GFX950-GISEL: ; %bb.0: |
| 50 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[16:17], s[14:15] |
| 51 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[14:15], s[12:13] |
| 52 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[12:13], s[10:11] |
| 53 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[10:11], s[8:9] |
| 54 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[8:9], s[6:7] |
| 55 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[6:7], s[4:5] |
| 56 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[4:5], s[2:3] |
| 57 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[2:3], s[0:1] |
| 58 | +; GFX950-GISEL-NEXT: v_mov_b32_e32 v18, 0x42c80000 |
| 59 | +; GFX950-GISEL-NEXT: v_cvt_scalef32_2xpk16_fp6_f32 v[2:7], v[2:17], v[2:17], v18 |
| 60 | +; GFX950-GISEL-NEXT: global_store_dwordx4 v[0:1], v[2:5], off |
| 61 | +; GFX950-GISEL-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16 |
| 62 | +; GFX950-GISEL-NEXT: s_endpgm |
| 63 | + %cvt = tail call <6 x i32> @llvm.amdgcn.cvt.scalef32.2xpk16.fp6.f32(<16 x float> %src, <16 x float> %src, float 100.0) |
| 64 | + store <6 x i32> %cvt, ptr addrspace(1) %out, align 8 |
| 65 | + ret void |
| 66 | +} |
| 67 | + |
| 68 | +define amdgpu_ps void @test_scalef32_pk32_bf6_f32_vv(<16 x float> %src, float %scale, ptr addrspace(1) %out) { |
| 69 | +; GFX950-SDAG-LABEL: test_scalef32_pk32_bf6_f32_vv: |
| 70 | +; GFX950-SDAG: ; %bb.0: |
| 71 | +; GFX950-SDAG-NEXT: v_mov_b32_e32 v19, v18 |
| 72 | +; GFX950-SDAG-NEXT: v_mov_b32_e32 v18, v17 |
| 73 | +; GFX950-SDAG-NEXT: v_cvt_scalef32_2xpk16_bf6_f32 v[0:5], v[0:15], v[0:15], v16 |
| 74 | +; GFX950-SDAG-NEXT: global_store_dwordx2 v[18:19], v[4:5], off offset:16 |
| 75 | +; GFX950-SDAG-NEXT: global_store_dwordx4 v[18:19], v[0:3], off |
| 76 | +; GFX950-SDAG-NEXT: s_endpgm |
| 77 | +; |
| 78 | +; GFX950-GISEL-LABEL: test_scalef32_pk32_bf6_f32_vv: |
| 79 | +; GFX950-GISEL: ; %bb.0: |
| 80 | +; GFX950-GISEL-NEXT: v_mov_b32_e32 v20, v17 |
| 81 | +; GFX950-GISEL-NEXT: v_mov_b32_e32 v21, v18 |
| 82 | +; GFX950-GISEL-NEXT: v_cvt_scalef32_2xpk16_bf6_f32 v[0:5], v[0:15], v[0:15], v16 |
| 83 | +; GFX950-GISEL-NEXT: global_store_dwordx4 v[20:21], v[0:3], off |
| 84 | +; GFX950-GISEL-NEXT: global_store_dwordx2 v[20:21], v[4:5], off offset:16 |
| 85 | +; GFX950-GISEL-NEXT: s_endpgm |
| 86 | + %cvt = tail call <6 x i32> @llvm.amdgcn.cvt.scalef32.2xpk16.bf6.f32(<16 x float> %src, <16 x float> %src, float %scale) |
| 87 | + store <6 x i32> %cvt, ptr addrspace(1) %out, align 8 |
| 88 | + ret void |
| 89 | +} |
| 90 | + |
| 91 | +define amdgpu_ps void @test_scalef32_pk32_bf6_f32_sl(<16 x float> inreg %src, ptr addrspace(1) %out) { |
| 92 | +; GFX950-SDAG-LABEL: test_scalef32_pk32_bf6_f32_sl: |
| 93 | +; GFX950-SDAG: ; %bb.0: |
| 94 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[16:17], s[14:15] |
| 95 | +; GFX950-SDAG-NEXT: s_mov_b32 s16, 0x42c80000 |
| 96 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[14:15], s[12:13] |
| 97 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[12:13], s[10:11] |
| 98 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[10:11], s[8:9] |
| 99 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[8:9], s[6:7] |
| 100 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[6:7], s[4:5] |
| 101 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[4:5], s[2:3] |
| 102 | +; GFX950-SDAG-NEXT: v_mov_b64_e32 v[2:3], s[0:1] |
| 103 | +; GFX950-SDAG-NEXT: v_cvt_scalef32_2xpk16_bf6_f32 v[2:7], v[2:17], v[2:17], s16 |
| 104 | +; GFX950-SDAG-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16 |
| 105 | +; GFX950-SDAG-NEXT: global_store_dwordx4 v[0:1], v[2:5], off |
| 106 | +; GFX950-SDAG-NEXT: s_endpgm |
| 107 | +; |
| 108 | +; GFX950-GISEL-LABEL: test_scalef32_pk32_bf6_f32_sl: |
| 109 | +; GFX950-GISEL: ; %bb.0: |
| 110 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[16:17], s[14:15] |
| 111 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[14:15], s[12:13] |
| 112 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[12:13], s[10:11] |
| 113 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[10:11], s[8:9] |
| 114 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[8:9], s[6:7] |
| 115 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[6:7], s[4:5] |
| 116 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[4:5], s[2:3] |
| 117 | +; GFX950-GISEL-NEXT: v_mov_b64_e32 v[2:3], s[0:1] |
| 118 | +; GFX950-GISEL-NEXT: v_mov_b32_e32 v18, 0x42c80000 |
| 119 | +; GFX950-GISEL-NEXT: v_cvt_scalef32_2xpk16_bf6_f32 v[2:7], v[2:17], v[2:17], v18 |
| 120 | +; GFX950-GISEL-NEXT: global_store_dwordx4 v[0:1], v[2:5], off |
| 121 | +; GFX950-GISEL-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16 |
| 122 | +; GFX950-GISEL-NEXT: s_endpgm |
| 123 | + %cvt = tail call <6 x i32> @llvm.amdgcn.cvt.scalef32.2xpk16.bf6.f32(<16 x float> %src, <16 x float> %src, float 100.0) |
| 124 | + store <6 x i32> %cvt, ptr addrspace(1) %out, align 8 |
| 125 | + ret void |
| 126 | +} |
| 127 | +;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: |
| 128 | +; GCN: {{.*}} |
0 commit comments