-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[LLVM] Add intrinsics for v_cvt_pk_norm_{i16,u16}_f16 #135631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Acim-Maravic
wants to merge
1
commit into
llvm:main
Choose a base branch
from
Acim-Maravic:v_cvt_pk_norm_i16u16_f16
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.pk.norm.i16.f16.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,124 @@ | ||||||||||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||||||||||
| ; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX9-SDAG %s | ||||||||||
| ; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX9-GISEL %s | ||||||||||
|
Comment on lines
+2
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
|
||||||||||
| define amdgpu_kernel void @cvt_pk_norm_i16_f16_sgpr(ptr addrspace(1) %out, half %a, half %b) { | ||||||||||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_i16_f16_sgpr: | ||||||||||
| ; GFX9-SDAG: ; %bb.0: | ||||||||||
| ; GFX9-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c | ||||||||||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||||||||||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v0, 0 | ||||||||||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-SDAG-NEXT: s_lshr_b32 s3, s2, 16 | ||||||||||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v1, s3 | ||||||||||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_i16_f16 v1, s2, v1 | ||||||||||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||||||||||
| ; GFX9-SDAG-NEXT: s_endpgm | ||||||||||
| ; | ||||||||||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_i16_f16_sgpr: | ||||||||||
| ; GFX9-GISEL: ; %bb.0: | ||||||||||
| ; GFX9-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c | ||||||||||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||||||||||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0 | ||||||||||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-GISEL-NEXT: s_lshr_b32 s3, s2, 16 | ||||||||||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v0, s3 | ||||||||||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_i16_f16 v0, s2, v0 | ||||||||||
| ; GFX9-GISEL-NEXT: global_store_dword v1, v0, s[0:1] | ||||||||||
| ; GFX9-GISEL-NEXT: s_endpgm | ||||||||||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.i16.f16(half %a, half %b) | ||||||||||
| %res = bitcast <2 x i16> %r to i32 | ||||||||||
| store i32 %res, ptr addrspace(1) %out | ||||||||||
| ret void | ||||||||||
| } | ||||||||||
|
|
||||||||||
| define amdgpu_kernel void @cvt_pk_norm_i16_f16_const(ptr addrspace(1) %out) { | ||||||||||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_i16_f16_const: | ||||||||||
| ; GFX9-SDAG: ; %bb.0: | ||||||||||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||||||||||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v0, 0 | ||||||||||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_i16_f16 v1, 1.0, 2.0 | ||||||||||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||||||||||
| ; GFX9-SDAG-NEXT: s_endpgm | ||||||||||
| ; | ||||||||||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_i16_f16_const: | ||||||||||
| ; GFX9-GISEL: ; %bb.0: | ||||||||||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||||||||||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_i16_f16 v0, 1.0, 2.0 | ||||||||||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0 | ||||||||||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-GISEL-NEXT: global_store_dword v1, v0, s[0:1] | ||||||||||
| ; GFX9-GISEL-NEXT: s_endpgm | ||||||||||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.i16.f16(half 1.0, half 2.0) | ||||||||||
| %res = bitcast <2 x i16> %r to i32 | ||||||||||
| store i32 %res, ptr addrspace(1) %out | ||||||||||
| ret void | ||||||||||
| } | ||||||||||
|
|
||||||||||
| define amdgpu_kernel void @cvt_pk_norm_i16_f16_undef(ptr addrspace(1) %out) { | ||||||||||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_i16_f16_undef: | ||||||||||
| ; GFX9-SDAG: ; %bb.0: | ||||||||||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||||||||||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v0, 0 | ||||||||||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_i16_f16 v1, s0, v0 | ||||||||||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||||||||||
| ; GFX9-SDAG-NEXT: s_endpgm | ||||||||||
| ; | ||||||||||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_i16_f16_undef: | ||||||||||
| ; GFX9-GISEL: ; %bb.0: | ||||||||||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||||||||||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0 | ||||||||||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_i16_f16 v0, s0, s0 | ||||||||||
| ; GFX9-GISEL-NEXT: global_store_dword v1, v0, s[0:1] | ||||||||||
| ; GFX9-GISEL-NEXT: s_endpgm | ||||||||||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.i16.f16(half undef, half undef) | ||||||||||
| %res = bitcast <2 x i16> %r to i32 | ||||||||||
| store i32 %res, ptr addrspace(1) %out | ||||||||||
| ret void | ||||||||||
| } | ||||||||||
|
|
||||||||||
| define amdgpu_kernel void @cvt_pk_norm_i16_f16_vgpr(ptr addrspace(1) %out, ptr addrspace(1) %a.ptr, ptr addrspace(1) %b.ptr) { | ||||||||||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_i16_f16_vgpr: | ||||||||||
| ; GFX9-SDAG: ; %bb.0: | ||||||||||
| ; GFX9-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24 | ||||||||||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x34 | ||||||||||
| ; GFX9-SDAG-NEXT: v_lshlrev_b32_e32 v1, 1, v0 | ||||||||||
| ; GFX9-SDAG-NEXT: v_lshlrev_b32_e32 v0, 2, v0 | ||||||||||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-SDAG-NEXT: global_load_ushort v2, v1, s[2:3] glc | ||||||||||
| ; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) | ||||||||||
| ; GFX9-SDAG-NEXT: global_load_ushort v3, v1, s[6:7] glc | ||||||||||
| ; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) | ||||||||||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_i16_f16 v1, v2, v3 | ||||||||||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||||||||||
| ; GFX9-SDAG-NEXT: s_endpgm | ||||||||||
| ; | ||||||||||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_i16_f16_vgpr: | ||||||||||
| ; GFX9-GISEL: ; %bb.0: | ||||||||||
| ; GFX9-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24 | ||||||||||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x34 | ||||||||||
| ; GFX9-GISEL-NEXT: v_lshlrev_b32_e32 v1, 1, v0 | ||||||||||
| ; GFX9-GISEL-NEXT: v_lshlrev_b32_e32 v0, 2, v0 | ||||||||||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||||||||||
| ; GFX9-GISEL-NEXT: global_load_ushort v2, v1, s[2:3] glc | ||||||||||
| ; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) | ||||||||||
| ; GFX9-GISEL-NEXT: global_load_ushort v3, v1, s[6:7] glc | ||||||||||
| ; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) | ||||||||||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_i16_f16 v1, v2, v3 | ||||||||||
| ; GFX9-GISEL-NEXT: global_store_dword v0, v1, s[0:1] | ||||||||||
| ; GFX9-GISEL-NEXT: s_endpgm | ||||||||||
| %tid = call i32 @llvm.amdgcn.workitem.id.x() | ||||||||||
| %tid.ext = sext i32 %tid to i64 | ||||||||||
| %a.gep = getelementptr inbounds half, ptr addrspace(1) %a.ptr, i64 %tid.ext | ||||||||||
| %b.gep = getelementptr inbounds half, ptr addrspace(1) %b.ptr, i64 %tid.ext | ||||||||||
| %out.gep = getelementptr inbounds i32, ptr addrspace(1) %out, i64 %tid.ext | ||||||||||
| %a = load volatile half, ptr addrspace(1) %a.gep | ||||||||||
| %b = load volatile half, ptr addrspace(1) %b.gep | ||||||||||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.i16.f16(half %a, half %b) | ||||||||||
| %res = bitcast <2 x i16> %r to i32 | ||||||||||
| store i32 %res, ptr addrspace(1) %out.gep | ||||||||||
| ret void | ||||||||||
| } | ||||||||||
124 changes: 124 additions & 0 deletions
124
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.pk.norm.u16.f16.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
| ; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX9-SDAG %s | ||
| ; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX9-GISEL %s | ||
|
|
||
| define amdgpu_kernel void @cvt_pk_norm_u16_f16_sgpr(ptr addrspace(1) %out, half %a, half %b) { | ||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_u16_f16_sgpr: | ||
| ; GFX9-SDAG: ; %bb.0: | ||
| ; GFX9-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c | ||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v0, 0 | ||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-SDAG-NEXT: s_lshr_b32 s3, s2, 16 | ||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v1, s3 | ||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_u16_f16 v1, s2, v1 | ||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||
| ; GFX9-SDAG-NEXT: s_endpgm | ||
| ; | ||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_u16_f16_sgpr: | ||
| ; GFX9-GISEL: ; %bb.0: | ||
| ; GFX9-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c | ||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0 | ||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-GISEL-NEXT: s_lshr_b32 s3, s2, 16 | ||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v0, s3 | ||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_u16_f16 v0, s2, v0 | ||
| ; GFX9-GISEL-NEXT: global_store_dword v1, v0, s[0:1] | ||
| ; GFX9-GISEL-NEXT: s_endpgm | ||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.u16.f16(half %a, half %b) | ||
| %res = bitcast <2 x i16> %r to i32 | ||
| store i32 %res, ptr addrspace(1) %out | ||
| ret void | ||
| } | ||
|
|
||
| define amdgpu_kernel void @cvt_pk_norm_u16_f16_const(ptr addrspace(1) %out) { | ||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_u16_f16_const: | ||
| ; GFX9-SDAG: ; %bb.0: | ||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v0, 0 | ||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_u16_f16 v1, 1.0, 2.0 | ||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||
| ; GFX9-SDAG-NEXT: s_endpgm | ||
| ; | ||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_u16_f16_const: | ||
| ; GFX9-GISEL: ; %bb.0: | ||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_u16_f16 v0, 1.0, 2.0 | ||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0 | ||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-GISEL-NEXT: global_store_dword v1, v0, s[0:1] | ||
| ; GFX9-GISEL-NEXT: s_endpgm | ||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.u16.f16(half 1.0, half 2.0) | ||
| %res = bitcast <2 x i16> %r to i32 | ||
| store i32 %res, ptr addrspace(1) %out | ||
| ret void | ||
| } | ||
|
|
||
| define amdgpu_kernel void @cvt_pk_norm_u16_f16_undef(ptr addrspace(1) %out) { | ||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_u16_f16_undef: | ||
| ; GFX9-SDAG: ; %bb.0: | ||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||
| ; GFX9-SDAG-NEXT: v_mov_b32_e32 v0, 0 | ||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_u16_f16 v1, s0, v0 | ||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||
| ; GFX9-SDAG-NEXT: s_endpgm | ||
| ; | ||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_u16_f16_undef: | ||
| ; GFX9-GISEL: ; %bb.0: | ||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24 | ||
| ; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0 | ||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_u16_f16 v0, s0, s0 | ||
| ; GFX9-GISEL-NEXT: global_store_dword v1, v0, s[0:1] | ||
| ; GFX9-GISEL-NEXT: s_endpgm | ||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.u16.f16(half undef, half undef) | ||
| %res = bitcast <2 x i16> %r to i32 | ||
| store i32 %res, ptr addrspace(1) %out | ||
| ret void | ||
| } | ||
|
|
||
| define amdgpu_kernel void @cvt_pk_norm_u16_f16_vgpr(ptr addrspace(1) %out, ptr addrspace(1) %a.ptr, ptr addrspace(1) %b.ptr) { | ||
| ; GFX9-SDAG-LABEL: cvt_pk_norm_u16_f16_vgpr: | ||
| ; GFX9-SDAG: ; %bb.0: | ||
| ; GFX9-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24 | ||
| ; GFX9-SDAG-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x34 | ||
| ; GFX9-SDAG-NEXT: v_lshlrev_b32_e32 v1, 1, v0 | ||
| ; GFX9-SDAG-NEXT: v_lshlrev_b32_e32 v0, 2, v0 | ||
| ; GFX9-SDAG-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-SDAG-NEXT: global_load_ushort v2, v1, s[2:3] glc | ||
| ; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX9-SDAG-NEXT: global_load_ushort v3, v1, s[6:7] glc | ||
| ; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX9-SDAG-NEXT: v_cvt_pknorm_u16_f16 v1, v2, v3 | ||
| ; GFX9-SDAG-NEXT: global_store_dword v0, v1, s[0:1] | ||
| ; GFX9-SDAG-NEXT: s_endpgm | ||
| ; | ||
| ; GFX9-GISEL-LABEL: cvt_pk_norm_u16_f16_vgpr: | ||
| ; GFX9-GISEL: ; %bb.0: | ||
| ; GFX9-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24 | ||
| ; GFX9-GISEL-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x34 | ||
| ; GFX9-GISEL-NEXT: v_lshlrev_b32_e32 v1, 1, v0 | ||
| ; GFX9-GISEL-NEXT: v_lshlrev_b32_e32 v0, 2, v0 | ||
| ; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; GFX9-GISEL-NEXT: global_load_ushort v2, v1, s[2:3] glc | ||
| ; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX9-GISEL-NEXT: global_load_ushort v3, v1, s[6:7] glc | ||
| ; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX9-GISEL-NEXT: v_cvt_pknorm_u16_f16 v1, v2, v3 | ||
| ; GFX9-GISEL-NEXT: global_store_dword v0, v1, s[0:1] | ||
| ; GFX9-GISEL-NEXT: s_endpgm | ||
| %tid = call i32 @llvm.amdgcn.workitem.id.x() | ||
| %tid.ext = sext i32 %tid to i64 | ||
| %a.gep = getelementptr inbounds half, ptr addrspace(1) %a.ptr, i64 %tid.ext | ||
| %b.gep = getelementptr inbounds half, ptr addrspace(1) %b.ptr, i64 %tid.ext | ||
| %out.gep = getelementptr inbounds i32, ptr addrspace(1) %out, i64 %tid.ext | ||
| %a = load volatile half, ptr addrspace(1) %a.gep | ||
| %b = load volatile half, ptr addrspace(1) %b.gep | ||
| %r = call <2 x i16> @llvm.amdgcn.cvt.pk.norm.u16.f16(half %a, half %b) | ||
| %res = bitcast <2 x i16> %r to i32 | ||
| store i32 %res, ptr addrspace(1) %out.gep | ||
| ret void | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing error test on unsupported targets