[PATCH] D156106: [AMDGPU] Test codegen'ing True16 additions.
Ivan Kosarev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 04:14:27 PDT 2023
kosarev created this revision.
kosarev added reviewers: arsenm, rampitec, Joe_Nash, foad.
Herald added subscribers: StephenFan, kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
kosarev requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
The GlobalISel part is to be addressed later.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156106
Files:
llvm/test/CodeGen/AMDGPU/fadd.f16.ll
Index: llvm/test/CodeGen/AMDGPU/fadd.f16.ll
===================================================================
--- llvm/test/CodeGen/AMDGPU/fadd.f16.ll
+++ llvm/test/CodeGen/AMDGPU/fadd.f16.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -enable-misched=false < %s | FileCheck -check-prefixes=SI %s
; RUN: llc -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs -enable-misched=false < %s | FileCheck -check-prefixes=VI %s
-; RUN: llc -march=amdgcn -mcpu=gfx1100 -mattr=-flat-for-global -verify-machineinstrs -enable-misched=false < %s | FileCheck -check-prefixes=GFX11 %s
+; RUN: llc -march=amdgcn -mcpu=gfx1100 -amdgpu-true16 -mattr=-flat-for-global -verify-machineinstrs -enable-misched=false < %s | FileCheck -check-prefixes=GFX11 %s
define amdgpu_kernel void @fadd_f16(
; SI-LABEL: fadd_f16:
@@ -73,7 +73,9 @@
; GFX11-NEXT: s_waitcnt vmcnt(0)
; GFX11-NEXT: buffer_load_u16 v1, off, s[0:3], 0 glc dlc
; GFX11-NEXT: s_waitcnt vmcnt(0)
-; GFX11-NEXT: v_add_f16_e32 v0, v0, v1
+; GFX11-NEXT: v_mov_b16_e32 v0.h, v1.l
+; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11-NEXT: v_add_f16_e32 v0.l, v0.l, v0.h
; GFX11-NEXT: buffer_store_b16 v0, off, s[8:11], 0
; GFX11-NEXT: s_nop 0
; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
@@ -142,7 +144,9 @@
; GFX11-NEXT: s_mov_b32 s3, s7
; GFX11-NEXT: buffer_load_u16 v0, off, s[0:3], 0
; GFX11-NEXT: s_waitcnt vmcnt(0)
-; GFX11-NEXT: v_add_f16_e32 v0, 1.0, v0
+; GFX11-NEXT: v_mov_b16_e32 v0.h, 0x3c00
+; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11-NEXT: v_add_f16_e32 v0.l, v0.l, v0.h
; GFX11-NEXT: buffer_store_b16 v0, off, s[4:7], 0
; GFX11-NEXT: s_nop 0
; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
@@ -209,7 +213,9 @@
; GFX11-NEXT: s_mov_b32 s3, s7
; GFX11-NEXT: buffer_load_u16 v0, off, s[0:3], 0
; GFX11-NEXT: s_waitcnt vmcnt(0)
-; GFX11-NEXT: v_add_f16_e32 v0, 2.0, v0
+; GFX11-NEXT: v_mov_b16_e32 v0.h, 0x4000
+; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11-NEXT: v_add_f16_e32 v0.l, v0.l, v0.h
; GFX11-NEXT: buffer_store_b16 v0, off, s[4:7], 0
; GFX11-NEXT: s_nop 0
; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156106.543470.patch
Type: text/x-patch
Size: 2365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230724/30ffcbd7/attachment.bin>
More information about the llvm-commits
mailing list