| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 |
| ; RUN: llc -mtriple=amdgpu12.50 -show-mc-encoding -mattr=-real-true16 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-FAKE16 %s |
| ; RUN: llc -mtriple=amdgpu12.50 -show-mc-encoding -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-REAL16 %s |
| ; RUN: llc -mtriple=amdgpu13.10 -show-mc-encoding -mattr=-real-true16 < %s | FileCheck -check-prefixes=GFX13,GFX13-FAKE16 %s |
| ; RUN: llc -mtriple=amdgpu13.10 -show-mc-encoding -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX13,GFX13-REAL16 %s |
| |
| define i16 @cvt_pk_bf8_f16_v(ptr addrspace(1) %out) { |
| ; GFX1250-FAKE16-LABEL: cvt_pk_bf8_f16_v: |
| ; GFX1250-FAKE16: ; %bb.0: |
| ; GFX1250-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX1250-FAKE16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX1250-FAKE16-NEXT: v_cvt_pk_bf8_f16_e64 v0, 0x38003800 ; encoding: [0x00,0x00,0x73,0xd7,0xff,0x00,0x01,0x02,0x00,0x38,0x00,0x38] |
| ; GFX1250-FAKE16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x48,0x80,0xbe] |
| ; |
| ; GFX1250-REAL16-LABEL: cvt_pk_bf8_f16_v: |
| ; GFX1250-REAL16: ; %bb.0: |
| ; GFX1250-REAL16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX1250-REAL16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX1250-REAL16-NEXT: v_cvt_pk_bf8_f16_e64 v0.l, 0x38003800 ; encoding: [0x00,0x00,0x73,0xd7,0xff,0x00,0x01,0x02,0x00,0x38,0x00,0x38] |
| ; GFX1250-REAL16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x48,0x80,0xbe] |
| ; |
| ; GFX13-FAKE16-LABEL: cvt_pk_bf8_f16_v: |
| ; GFX13-FAKE16: ; %bb.0: |
| ; GFX13-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_expcnt 0x0 ; encoding: [0x00,0x00,0xc4,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_samplecnt 0x0 ; encoding: [0x00,0x00,0xc2,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_bvhcnt 0x0 ; encoding: [0x00,0x00,0xc3,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX13-FAKE16-NEXT: v_cvt_pk_bf8_f16_e32 v0, 0x38003800 ; encoding: [0xff,0x5a,0x00,0x7e,0x00,0x38,0x00,0x38] |
| ; GFX13-FAKE16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x20,0x80,0xbe] |
| ; |
| ; GFX13-REAL16-LABEL: cvt_pk_bf8_f16_v: |
| ; GFX13-REAL16: ; %bb.0: |
| ; GFX13-REAL16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_expcnt 0x0 ; encoding: [0x00,0x00,0xc4,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_samplecnt 0x0 ; encoding: [0x00,0x00,0xc2,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_bvhcnt 0x0 ; encoding: [0x00,0x00,0xc3,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX13-REAL16-NEXT: v_cvt_pk_bf8_f16_e32 v0.l, 0x38003800 ; encoding: [0xff,0x5a,0x00,0x7e,0x00,0x38,0x00,0x38] |
| ; GFX13-REAL16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x20,0x80,0xbe] |
| %cvt = tail call i16 @llvm.amdgcn.cvt.pk.bf8.f16(<2 x half> <half 0xH3800, half 0xH3800>) |
| ret i16 %cvt |
| } |
| |
| ; GFX1250: codeLenInByte = 24 |
| ; GFX13: codeLenInByte = 32 |
| |
| define i16 @cvt_pk_fp8_f16_v(ptr addrspace(1) %out) { |
| ; GFX1250-FAKE16-LABEL: cvt_pk_fp8_f16_v: |
| ; GFX1250-FAKE16: ; %bb.0: |
| ; GFX1250-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX1250-FAKE16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX1250-FAKE16-NEXT: v_cvt_pk_fp8_f16_e64 v0, 0x3800 ; encoding: [0x00,0x00,0x72,0xd7,0xff,0x00,0x01,0x02,0x00,0x38,0x00,0x00] |
| ; GFX1250-FAKE16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x48,0x80,0xbe] |
| ; |
| ; GFX1250-REAL16-LABEL: cvt_pk_fp8_f16_v: |
| ; GFX1250-REAL16: ; %bb.0: |
| ; GFX1250-REAL16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX1250-REAL16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX1250-REAL16-NEXT: v_cvt_pk_fp8_f16_e64 v0.l, 0x3800 ; encoding: [0x00,0x00,0x72,0xd7,0xff,0x00,0x01,0x02,0x00,0x38,0x00,0x00] |
| ; GFX1250-REAL16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x48,0x80,0xbe] |
| ; |
| ; GFX13-FAKE16-LABEL: cvt_pk_fp8_f16_v: |
| ; GFX13-FAKE16: ; %bb.0: |
| ; GFX13-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_expcnt 0x0 ; encoding: [0x00,0x00,0xc4,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_samplecnt 0x0 ; encoding: [0x00,0x00,0xc2,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_bvhcnt 0x0 ; encoding: [0x00,0x00,0xc3,0xbf] |
| ; GFX13-FAKE16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX13-FAKE16-NEXT: v_cvt_pk_fp8_f16_e32 v0, 0x3800 ; encoding: [0xff,0x58,0x00,0x7e,0x00,0x38,0x00,0x00] |
| ; GFX13-FAKE16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x20,0x80,0xbe] |
| ; |
| ; GFX13-REAL16-LABEL: cvt_pk_fp8_f16_v: |
| ; GFX13-REAL16: ; %bb.0: |
| ; GFX13-REAL16-NEXT: s_wait_loadcnt_dscnt 0x0 ; encoding: [0x00,0x00,0xc8,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_expcnt 0x0 ; encoding: [0x00,0x00,0xc4,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_samplecnt 0x0 ; encoding: [0x00,0x00,0xc2,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_bvhcnt 0x0 ; encoding: [0x00,0x00,0xc3,0xbf] |
| ; GFX13-REAL16-NEXT: s_wait_kmcnt 0x0 ; encoding: [0x00,0x00,0xc7,0xbf] |
| ; GFX13-REAL16-NEXT: v_cvt_pk_fp8_f16_e32 v0.l, 0x3800 ; encoding: [0xff,0x58,0x00,0x7e,0x00,0x38,0x00,0x00] |
| ; GFX13-REAL16-NEXT: s_set_pc_i64 s[30:31] ; encoding: [0x1e,0x20,0x80,0xbe] |
| %cvt = tail call i16 @llvm.amdgcn.cvt.pk.fp8.f16(<2 x half> <half 0xH3800, half 0xH0>) |
| ret i16 %cvt |
| } |
| |
| ; GFX1250: codeLenInByte = 24 |
| ; GFX13: codeLenInByte = 32 |